Ask questions and get good answers on mb.jQuery.components

Hi...

First I want to say Thank you for your amazing work in jQuery..

I'm using the scrollable in the website that I'm working on.. But I have a problem with scrollable only when I change the page direction from Left to Right(ltr) to Right to Left(rtl) by typing dir="rtl" in the Html tag

What can I do to make it work? I hope you can help me?

Thanks..

asked Jun 07 '10 at 13:40

alsamawy's gravatar image

alsamawy
133

edited Jun 07 '10 at 19:43

Matteo%20Bicocchi's gravatar image

Matteo Bicocchi ♦♦
1776129


Actually it doesn't work with RTL direction; to make it work on a RTL content I've to invert all the slide logic it's using now. Can't you wrap only my component into a DIV with LTR direction? This would be a work around to let it work even in a RTL environment.

for example:

<div id="wrapper" dir="RTL">
  <h1>mb.scrollable.demo</h1>
  <div id="orizontal" >
    One element per page; orizontal; autoscroll: true.
    <br>
    <br>
    <div id="myScroll" dir="LTR">
      <div class="scrollEl" style="background-color:#9999ff" dir="RTL">1</div>
      <div class="scrollEl" style="background-color:#cc9900" dir="RTL">2</div>
      <div class="scrollEl" style="background-color:#660066" dir="RTL">3</div>
      <div class="scrollEl" style="background-color:#009966" dir="RTL">4</div>
      ...

</div>

<div id="controls">
      <div class="first">first</div><div class="prev">prev</div>
      <div class="next">next</div><div class="last">last</div>
      <div class="pageIndex"></div>
      <div class="start">start</div><div class="stop">stop</div>
      <div class="goto" onclick="$('#myScroll').goToPage($('#pg').val());">go to page <input id="pg" style="width:20px; border:1px solid gray" value="1"></div>
      <div class="getIDX" onclick="alert($('#myScroll').get(0).idx);">getIDX</div>
    </div>
  </div>
</div>

In this way you would have RTL direction where you need and the component whould work. Anyway I hope to solve this issue soon. Sorry, Matteo

answered Jun 07 '10 at 18:01

Matteo%20Bicocchi's gravatar image

Matteo Bicocchi ♦♦
1776129

edited Jun 07 '10 at 19:44

Thank you very much Matteo..It's work now.

But I have another point if you can help me with it..

As u know the reason that make my change the direction of the page is to make the content of the page begin at the Right and finish at the left. So now I have small problem with the 'scrollable' movement because it's move from the Left to the Right ( ==> ) And this is contrary to the direction of the content of the page. What i want to say is, Is there any way to make the movement of the 'scrollable' form the Right to the Left ( <== )

Thank you for your help

(Jun 08 '10 at 13:08) alsamawy

Yes, I understand... and this is exactly the hard problem to solve to let it works on a RTL environment. I've to revers all the logic and I've to findout the less expensive (in time and in line-code) way to do it.

(Jun 08 '10 at 22:54) Matteo Bicocchi ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×2

Asked: Jun 07 '10 at 13:40

Seen: 331 times

Last updated: Jun 07 '10 at 19:44

Related questions

jQuery main site - Matteo Bicocchi