JQuery smoothly scrolls the page to the specified anchor tag

From , 2 Years ago, written in JavaScript, viewed 211 times.
URL https://pastebin.vip/view/1c383cd3
  1. var JQUERY4U = {}
  2. JQUERY4U.UTIL =
  3. {
  4.         /*
  5.         *   Utility function used to make anchor links animate smoothly instead of jumping.
  6.         */
  7. smoothAnchor:
  8.         function ( anchorClass )
  9.         {
  10.                 $ ( 'a.'+anchorClass ).click ( function ()
  11.                 {
  12.                         elementClick = $ ( this ).attr ( "href" )
  13.                         destination = $ ( elementClick ).offset().top;
  14. $ ( "html:not(:animated),body:not(:animated)" ).animate ( { scrollTop: destination}, 1100 );
  15.                         return false;
  16.                 } )
  17.         }
  18. }
  19.  

Reply to "JQuery smoothly scrolls the page to the specified anchor tag"

Here you can reply to the paste above

captcha

https://burned.cc - Burn After Reading Website