You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
$(window).scroll(function () { if ($(".navbar").offset().top > 50) { $(".navbar-fixed-top").addClass("top-nav-collapse"); } else { $(".navbar-fixed-top").removeClass("top-nav-collapse"); } }); $(function () { $('a.page-scroll').bind('click', function (event) { var $anchor = $(this); $('html, body').stop().animate({ scrollTop: $($anchor.attr('href')).offset().top }, 1500, 'easeInOutExpo'); event.preventDefault(); }); }); var menuArr = ['about', 'case', 'service', 'contact'] for (var i = 0; i < menuArr.length; i++) { var mtop = parseInt($('#' + menuArr[i]).css("margin-top").replace("px", "")) - 50; var ptop = parseInt($('#' + menuArr[i]).css("padding-top").replace("px", "")) + 65; $('#' + menuArr[i]).css("margin-top", mtop + "px").css("padding-top", ptop + "px"); }
|