[Solved] How to animate scroll down and up the webpage using jquery [duplicate]

If I understand correctly, this is what you’re looking for: $(document).ready(function() { $(‘ul.navigation’).on(‘click’, ‘a’, function(e) { e.preventDefault(); $(‘html, body’).animate({ scrollTop: $( $.attr(this, ‘href’) ).offset().top }, 500); }); }); 7 solved How to animate scroll down and up the webpage using jquery [duplicate]

[Solved] change div color after scrolling 15% down with jquery [closed]

Try: $(document).ready(function () { var $scrollingDiv = $(“#navbar”); $(window).scroll(function () { $scrollingDiv.stop() .animate({ “marginTop”: ($(window).scrollTop() + 0) + “px” }, “slow”); $scrollingDiv.css(“background-color”, (($(window).scrollTop() / $(document).height()) > 0.15) ? “orange” : “”); }); }); Demo 1 solved change div color after scrolling 15% down with jquery [closed]