

Therefore, will be called against no elements (which, in most cases, These methods return a jQuery object containing an empty array, just likeĪll of jQuery's other DOM traversal methods. To determine which element is scrollable. $.fn.firstScrollable DOM traversal method (also defined by this plugin) The plugin's $.fn.smoothScroll and $.smoothScroll methods use the.It does not look at the element's name attribute. To determine where to scroll the page, the $.fn.smoothScroll method looksįor an element with an id attribute that matches the element's hash.
Smoothscroll in jquery 1.4.4 code#
The following code will scroll the document down one page at a time when the user clicks the ".pagedown" button: With smoothScroll version 2.1 and later, you can use the "relative string" syntax to scroll an element or the document a certain number of pixels relative to its current position.

Grab the code and paste it into your own file:
