
To get and set the current horizontal scroll position of an element, scrollLeft()
method can be used.
<script> alert($("#divScroll").scrollLeft()); $("#divScroll").scrollLeft("100"); </script>
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: 12419 | Post Order: 56