In this tip i share a simple script to scroll item on page scroll using jquery
<div id="minions" class="" style="position: absolute; right: 10px; top: 40px;"><img src="https://lh3.googleusercontent.com/-ebrFqgOErsU/Vd_CufgquEI/AAAAAAAABxc/tplUqDwr0YY/s152-Ic42/ca84ee1d-66bb-4d62-8c07-c9ec43b3ee3d.jpg" alt="" /></div> <script type="text/javascript"> (function($) { var offset = $("#minions").offset(); var topPadding = 0; $(window).scroll(function() { if ($(window).scrollTop() > offset.top) { $("#minions").stop().animate({ marginTop: $(window).scrollTop() - offset.top + topPadding }); } else { $("#minions").stop().animate({ marginTop: 0 }); }; }); }(jQuery)); </script>