#
October 22, 2012 at 11:12 pm
Hi there,
We are using AnythingSlider for one of our projects and we are loading in slides dynamically using AJAX. Once the control has initially loaded, the immediate previous and immediate next slides are loaded in over AJAX. When the slider moves across to one of these slides, we add the previous/next slide and so on.
However, I am having a problem which is driving me absolutely nuts: how can I find out which direction the user has clicked?
For example, if I have records 1,2,3,4,5 and the slider is currently displaying record 4, how do I know whether the user has clicked the previous or next button? In other words, how do I know if they have navigated to slide 3 or slide 5?
This is something that I’ve been looking at for a couple of days now. I’ve tried binding to the onSlideComplete and the onSlideInit events and there appears to be no way of telling which direction the slider is moving. There is no explanation of the ‘e’ variable for the onSlideInit event, which is where I would have thought I could find an e.direction property or something.
I would highly appreciate it if you could get back to me as soon as possible as I’m having to hack the main source code with my own function calls to get it working! :(
Cheers,
Graham