开发者

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜