Reputation: 4753
I have a function which relies on the value of scrollLeft. Now, I need have this function work in right to left direction( arabic ), so I need to figure out how to get the proper scrollRight value. Can someone enlighten me?
Upvotes: 0
Views: 1361
Reputation: 24395
Find the width of the page and subtract it from scrollLeft()
's value.
var left = $('html').scrollLeft();
var screenSize = 1024; //find width of screen / viewport. google.
var right = screensize - left;
Upvotes: 1