Tag Archives: jquery scrollleft not working
jQuery scrollLeft Method
jQuery .scrollLeft Method : is used to get or set the horizontal scrollbar position of the selected element. .scrollLeft() is used to set or get the scrollbar position. If you want to set position of scrollbar pass value in pixel as input parameter.
We are going to explain both example with demo and example.
jQuery scrollLeft Method Syntax 1 – Get The Position
Syntax for scrollLeft Method –
$(selector).scrollLeft();
jQuery scrollLeft() Method Example 1
Below example shows the scrollLfet method get scrollbar position method –
jQuery scrollLeft Method 2 – Set The Position
Syntax for set position –
$(selector).scrollleft(position);
position(px): Pixel position to be scrolled.
jQuery scrollLeft() Method Example 2
Below example will set position 100 from left –
Here is output of the example –