开发者

jQuery: What does $("html") mean?

What does $("html") mean?

i.e. $("html").scrollTop(0开发者_JAVA百科);


It means to select the <html> element in the page, and scroll to it's top position. Since that's the very top of the document, you're scrolling the browser all the way up.


$("html") selects all elements of the type html. And that’s the root element in HTML. The same can be done with $(document) or $(document.documentElement).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜