The following code in the middle of the browser, refresh the page, will become a web page at the top of the code, the mouse scroll to become the top code,
Scroll: function () {
$(window). Scroll (function () {
Document. The documentElement. ScrollTop + document. The body. The scrollTop & gt; 75? JQuery (' header '). AddClass (' scrolled) : jQuery (' header '). RemoveClass (' scrolled);
Document. The documentElement. ScrollTop + document. The body. The scrollTop & gt; 150? JQuery (' totop - li '). The show () : the jQuery (' totop - li '). Hide ();
});
},