But the problem is that the page redirects me to fast and the bounce animation is not displayed.
How could I fix this?
$(document).ready(function() { $("a").click(function() { $(this).effect("bounce", { times:2 }, 300); }); });
WendellHarper - Dec 06 2020 01:21 PM
WendellHarper - Dec 06 2020 01:14 PM
pindo - Jul 23 2020 01:33 AM
Siten0308 - Jun 20 2019 01:43 PM
johnnylo - Apr 23 2019 07:49 AM
Posted 19 December 2012 - 07:42 AM
$(document).ready(function() { $("a").click(function() { $(this).effect("bounce", { times:2 }, 300); }); });
Posted 19 December 2012 - 07:47 AM
.effect( effect [, options ] [, duration ] [, complete ] )
Edited by wim DC, 19 December 2012 - 07:47 AM.
Posted 19 December 2012 - 09:13 AM
http://api.jqueryui.com/effect/
You should be able to pass a4th parameter, a function to the effect method.
Inside the method you can perform the redirect.
Don't use an <a> tag, but a <span> instead. (otherwise you must write code to preven the default action of the <a> tag, which is avoidable)