Put soft effect or slowness in anchor (window.location.href) [duplicate]

1

I have the following code:

if($('#otherfilter').is(':visible')){
  window.location.href='#otherfilter';
}

I would like to slow him down to make this anchor.

    
asked by anonymous 28.09.2017 / 19:26

1 answer

-1
$(function() {
                $('a').bind('click',function(event){
                    var $anchor = $(this);

                  $('html, body').stop().animate({scrollTop: $($anchor.attr('href')).offset().top}, 1000,'easeInOutExpo');

            // Outras Animações
            // linear, swing, jswing, easeInQuad, easeInCubic, easeInQuart, easeInQuint, easeInSine, easeInExpo, easeInCirc, easeInElastic, easeInBack, easeInBounce, easeOutQuad, easeOutCubic, easeOutQuart, easeOutQuint, easeOutSine, easeOutExpo, easeOutCirc, easeOutElastic, easeOutBack, easeOutBounce, easeInOutQuad, easeInOutCubic, easeInOutQuart, easeInOutQuint, easeInOutSine, easeInOutExpo, easeInOutCirc, easeInOutElastic, easeInOutBack, easeInOutBounce


                });
            });

For the html you can follow this structure, link with the hashtag and id in the session wherever the page slides

    
29.09.2017 / 13:49