$ ('. Back_top '). Bind (' click ', function () {
$ ("HTML, Body"). Animate ({scrolltop:0}, 200);
});
$ ('. Back_top '). Bind ({click:function () {) {
$ ("HTML, Body"). Animate ({scrolltop:0}, 200)}
});
HTML returns to the top of
1.<body style= ' height:3000px; ' ><div style= "position:fixed;bottom:100px;" ><a href= "#" target= "_self" >UP</a></div></body>
2.<a style= "position:fixed;bottom:10px; left:10px, "onclick=" Javascript:scroll (0,0) ">TOP</a>
<a style= "position:fixed;bottom:10px; left:10px, "onclick=" Window.Scroll (0,0) ">TOP</a>
Bind () Multiple events eg:
$ (document). Ready (function () {
$ ("button"). On ({
Click:function () {$ ("P"). Slidetoggle ();},
Mouseover:function () {$ ("body"). CSS ("Background-color", "Red");},
Mouseout:function () {$ ("body"). CSS ("Background-color", "#FFFFFF");}
});
});
Returns the top, on () binding events