Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // scroll к якорю
- $(function(){
- $(".класс_ссылки_для_скрола").click(function(){
- var _href = $(this).attr("href");
- $("html, body").animate({scrollTop: $(_href).offset().top - 80 +"px"});
- return false;
- });
- });
- // scroll после перезагрузки страницы
- (function(){
- var hash = document.location.hash;
- if( hash != '' && jQuery( hash ) != 'undefined') {
- jQuery('html, body').animate({
- scrollTop: jQuery(hash).offset().top },
- 1000
- );
- }
- })(window.jQuery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement