New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a way to get the scroll position for the slidee #75
Comments
It does NOT work. The No property returns any changes (or anything similar to |
There is one way: You first get this:
which returns a matrix, which you then need to parse to get the desired value.
But I was looking for something straightforward, and I think Sly should expose it. |
If what you say would be true, Sly wouldn't work, because the output of slidee.style.transform = 'translateX(' + (-sly.pos.cur) + 'px)';
var sly = new Sly(frame, options).init(); If you don't see the current position property change, it means you are retrieving it before the scrolling happened. Also, properties like Basically I've just rewritten the documentation I've referred you to. Glad that it is all documented so this wouldn't have to happen... :) |
I am ONLY scrolling -- and NOT reloading the instance neither am I changing the content size. Could this be because of this? UPDATE: It does NOT work even after calling the reload:
Also note that I am getting the Can you please point out where I am doing something wrong? UPDATE 2: MY BAD You were right. I was doing something wrong. When I display the whole object Anyway thanks for helping me. UPDATE 3: The |
Overall, just RTFM dude. |
Ok, just try this jsFiddle in Firefox (version 19): By clicking on the content you will see the scroll bar value displayed in the console. First scroll down (drag the bar) a little and click: Then, scroll up (drag the bar don't use wheel) and click: The jsFiddle is: (It works perfectly in Safari and Chrome) |
Fetching Tried the fiddle, works as expected. |
Did you try it in Firefox 19 -- because on my end, in FF 19 it's not working. Maybe I am doing something wrong. |
I want to get the number of pixels the scroll bar has been scrolled.
For example, initially the CSS of the slidee shows this:
Now, when I scroll a little, it changes to:
The
-113
is the value I want to be able to get programmatically.How can I do this?
The text was updated successfully, but these errors were encountered: