0

I am trying to change the direction of jQuery Rhinoslider after each animation. I think it's just a matter of changing the slideNextDirection setting, but I don't know too much about the jQuery plugin structure and how to get at that setting. This is what I tried, but obviously it doesn't work:

$slider = $('#slider').rhinoslider({
    slideNextDirection: 'toTop',
    callBackNext: function() {
        $(this).slideNextDirection = 'toLeft';
        //tried this too :)
        //$slider.slideNextDirection = 'toLeft';
        return false;
    }
});

Any ideas?

shauno
  • 121
  • 2
  • 10

1 Answers1

0

To change the settings on the fly isn't possible. But you can uninit Rhinoslider and call it afterwards with your changes. See: http://rhinoslider.com/api/external-calls-of-internal-functions/

In version 1.1 coming in a few weeks you can also set the slide to start.

  • Thanks for the quick reply. This is a one off thing that someone needed quickly, so I've tweaked the plugin core to solve this. I know, I know, I'm a terrible person :) I just altered the `direction` variable conditionally in the `slide()` method. Thanks for a great piece of code, I'm sure I will be using it more in the future! – shauno May 16 '12 at 14:24
  • Perfect, that you found a solution for your problem. This is what we have suggested next. But for this solution you need some knowledge of Javascript – Rhinoslider Devlopment Team May 16 '12 at 15:05