Detect scrollLeft Property In RTL Direction - rtl-scroll.js

File Size: 4.53 KB
Views Total: 1043
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
Detect scrollLeft Property In RTL Direction - rtl-scroll.js

The Element.scrollLeft property gets or sets the number of pixels that an element's content is scrolled from its left edge.

If the page's direction is rtl (right-to-left), Firefox scrolls from zero to negative numbers and Google Chrome from positive numbers to zero.

The rtl-scroll.js is such a jQuery plugin created to detect and fix the scrollLeft differences in different browsers, without browser detection.

How to use it:

1. Download and load the jquery.rtl-scroll.js script after jQuery library.

<script src="" 
<script src="jquery.rtl-scroll.js"></script>

2. Check the scrollLeft type in the current browser.


3. It will return 3 types of scrollLeft:

  • WebKit: default
  • Firefox: negative
  • IE: reverse

More Resources:



  • Fixed for IE6


  • Plugin should work if script tag placed in head
  • IE6/7 only support inline-block on default inline elements


  • Detect Element.prototype.scrollIntoView


  • Use a 'position: fixed' scroller.

This awesome jQuery plugin is developed by othree. For more Advanced Usages, please check the demo page or visit the official website.