Skip to content

Commit

Permalink
Docs: Add scroller widget RTL details. See #906
Browse files Browse the repository at this point in the history
  • Loading branch information
Mottie committed Jul 12, 2016
1 parent 01e1165 commit b015da6
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/example-widget-scroller.html
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,26 @@ <h3>Change Fixed Column Size Dynamically</h3>
</ul>
</blockquote>
</div>

<h3><a href="#">RTL Support</a></h3>
<div>
Two things are required to get the fixed column properly aligned on the right side:
<ol>
<li>
A class of <code>ts-scroller-rtl</code> must be added to the table
<pre class="prettyprint lang-html">&lt;table class=&quot;ts-scroller-rtl&quot;&gt;...&lt;/table&gt;</pre>
the reason for the weird naming <code>ts</code> instead of <code>tablesorter</code> is because with a class name of <code>tablesorter-scroller-rtl</code>, the code will think you're trying to add a theme named <code>scroller-rtl</code>.
<p>If you want to change this class name, use the following code before the document ready function:</p>
<pre class="prettyprint lang-js">$.tablesorter.css.scrollerRtl = "ts-scroller-rtl";</pre>
</li>
<li>
Whatever element is wrapping the table needs to be set with the css <code>direction:rtl</code>. So if your entire page (<code>body</code> is set, that will work just fine. If you only want the table to be set as rtl, then set this css on the scroller's wrapper:
<pre class="prettyprint lang-css locked">.tablesorter-scroller { direction: rtl; }</pre>
</li>
</ol>
Here is a <a href="https://jsfiddle.net/Mottie/uL8ugxw4/">jsFiddle demo</a>.
</div>

</div>

<h1>CSS</h1>
Expand Down

0 comments on commit b015da6

Please sign in to comment.