This article mainly introduces the intelligent hidden with jquery, return top code with sliding effect, very practical, need friends can refer to the following
Online Demo: Portal HTML code (placed anywhere on the page and decorated with CSS): Code is as follows: <p id= "Back-to-top" ><a href= "#top "><span></span> back to top </a></p> JS code: Code as follows: <script type=" text/ JavaScript "src=" Js/jquery-1.7.2.min.js "> </script> <script type=" Text/javascript "> $ ( Document). Ready (function () { //First hide #back-to-top $ ("#back-to-top" ). Hide (); //when the scroll bar position is below 100 pixels from the top, the jump link appears, otherwise disappears the $ (function () { &N Bsp $ (window). Scroll (function () { if ($ (window). s Crolltop () >) { $ ("#back-to-top"). FadeIn (1500 ); } else { & nbsp $ ("#back-to-top"). fadeout (1500); ( }); //when clicking the Jump link, back to page top position $ ("#back-to-top"). Click (function () { $ (' body,html ') animate ({ & nbsp scrolltop:0 }, & nbsp 1000); return false; }); }); }); </script>