Reputation: 805
I have hyperlinks on my site made like that:
<a href="#cennik">
<a name="cennik"></a>
Now I want to add 'swing' effect to this link (Cause now after clicking it's just 'jumping'). I guess that It has to be done in Javascript but I have no idea how. My only guess is that it's animate() function maybe... Thanks for any help !
Upvotes: 1
Views: 46
Reputation: 13866
Take a look at the documentation.
From there you can see that there's an easing option called "swing". If that's what you want then just configure the animation() method accordingly. For example:
$("#cennik").click(function(){
$("cennik").animate({width:"200px"}, "slow", "swing");
});
Upvotes: 1
Reputation: 1498
use below code
$(document).ready(function()
{
$("#cennik").click(function(){
$("#cennik").animate({height:"20px"},"slow","swing");
});
});
Upvotes: 0