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

What does it mean $("html")?

i.e. $("html").scrollTop(0);

+3
source share
2 answers

This means selecting an item <html>on the page and scrolling from top to top. Since this is the very top of the document, you scroll completely through the browser.

+6
source

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

+2
source

Source: https://habr.com/ru/post/1734684/


All Articles