Reputation: 2248
Guys i am working on a div which shows a calender by onclick(). I used toggle method to show and this that calender.
But while scrolling down i want to make the height of the div to change like this accordion.
I want to move my div a little above so that the calender will be visible to the user. Any ideas to animate the height which is used in that accordion?
Check this
[http://jsfiddle.net/vivekdx/VVP3v/2/]
I like to move the calender when i click "Show me the calender"
Upvotes: 1
Views: 259
Reputation: 36531
try this...
$('html, body').animate({ scrollTop: $('#calender').position().top }, 'slow');
here is the fiddle..
you are using slide toggle... so the effect might not look as it is in live.. :)
Upvotes: 1