What does jquery's scrollLeft function do
What does scrollLeft()
function of jquery do? What does it mean when I writ开发者_高级运维e $(window).scrollLeft()
,$(window).scrollLeft(1300)
, $("div.test").scrollLeft()
and $("div.test").scrollLeft(1000)
?
I'm assuming you're talking about the CSS .scrollLeft()
method?
Description: Get the current horizontal position of the scroll bar for the first element in the set of matched elements.
The horizontal scroll position is the same as the number of pixels that are hidden from view above the scrollable area. If the scroll bar is at the very left, or if the element is not scrollable, this number will be 0.
In other words, it tells you and lets you set how many pixels the page (or an element) is scrolled horizontally.
精彩评论