jQuery > Manipulations methods

.scrollLeft() - Get & set horizontal scroll position in jQuery

How to get and set the horizontal scroll position of an element in jQuery?

To get and set the current horizontal scroll position of an element, scrollLeft() method can be used.


Above code snippet will first alert the current scroll left position of the element whose id is “divScroll” and then move its horizontal scroll bar position to 100.

 Views: 11866 | Post Order: 56

Write for us

Hosting Recommendations