tayacave.blogg.se

Smoothscroll in jquery 1.4.4
Smoothscroll in jquery 1.4.4












smoothscroll in jquery 1.4.4

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.

  • Uses document.scrollingElement on compatible browsers when the selector is 'html' or 'body' or 'html, body'.Įxamples Scroll down one "page" at a time (v2.1+).
  • Exclude links if they are within a containing element: $('#container a').smoothScroll(, someSpeed).
  • Specify a containing element if you want: $('#container a').smoothScroll().
  • Works like this: $('a').smoothScroll().
  • You can try a bare-bones demo at /jquery-smooth-scroll/demo/ Features $.fn.smoothScroll

    smoothscroll in jquery 1.4.4

    Grab the code and paste it into your own file:














    Smoothscroll in jquery 1.4.4