I may adjust the message for clarity, style, or grammar. Multiple commits in a pull request will be squashed into a single commit. If possible, please use Tim Pope’s git commit message style. To be sure your additions comply, run grunt lint from the command line. Style conventions are noted in the jshint grunt file options and the. Thank you! Please consider the following when working on this repo before you submit a pull request:įor code changes, please work on the “source” file: src/. ![]() 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. Specify a containing element if you want: $(‘#container a’).smoothScroll() Įxclude links if they are within a containing element: $(‘#container a’).smoothScroll() You can try a bare-bones demo at /jquery-smooth-scroll/demo/ Go to the following URL in your browser and copy/paste the code into your own file: ![]() Note: Version 2.0+ of this plugin requires jQuery version 1.7 or greater. ![]() Allows for easy implementation of smooth scrolling for same-page links.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |