Friday 15 April 2011

transition - jQuery animate scroll to ID using easing functions -


I'm trying to scroll to specific id :

 Click the  $ ("# button1") ($ function () {$ ('html, body'). ({ScrollTop: $ ("# sec1"). Offset (). Top}, 700); < / Code>  

This works fine.

My question is:

How can I do the same thing by simplifying the task?

I have not tried the following functions:

  $ ("# button1"). Click (function () {$ ('html, body' Chetan ({scrollTop : $ ("#   

Any suggestion will be appreciated.

For ease of use other than

default or linear , you must include the jQuery UI. In the jQuery Animate API page, it says, "The only easy implementation in the jQuery library The default is called swing, and which progress at constant speed, which is called linear. "

For ease The jQuery UI page you are able to do other kinds can see that you include the jQuery UI, use.

No comments:

Post a Comment