Friday, 25 August 2017

Smooth Scroll to div Sticky header

Smooth Scroll to div

    var hash = "#block-block-33";
    jQuery('html, body').animate({
        scrollTop: jQuery(hash).offset().top-300
       }, 800, function(){

         // Add hash (#) to URL when done scrolling (default click behavior)
         //window.location.hash = hash;
         var a=jQuery(hash).offset().top-190;


         //jQuery('.search-icon').text(a);


        window.scrollTo(0,a);
    });
banner
Previous Post
Next Post

0 comments: