In the actual implemenation in the page the link is moving along with the page but not shown(visible) in page. When I click the css in browser the element appears in the scrolled position.\[code\] //elemet to appear when scrolling <a href="http://stackoverflow.com/questions/15628856/#" class="scrollup">Scroll</a> $(document).ready(function(){ $(window).scroll(function(){ if ($(this).scrollTop() > 100) { $('.scrollup').fadeIn(); } else { $('.scrollup').fadeOut(); } }); $('.scrollup').click(function(){ $("html, body").animate({ scrollTop: 0 }, 600); return false; }); }); //css for the element .scrollup{ width:40px; height:40px; opacity:0.3; position:fixed; bottom:50px; right:100px; display:none; }\[/code\]Not working in chrome. Working in firefox.