Search code examples
javascriptzurb-foundationzurb-joyride

Override defaults for foundation 4 joyride


I'm using foundation 4 and trying to override default settings for 'modal' and 'expose' for joyride:

$(document).foundation('joyride', 'start');

I have tried added a third parameter in this start call, tried added data-options to the html. Is a simple way do this?

I would like all the steps to be modal like with a faded out background. And would like to be able to control which elements are 'expose'

Any direction would be greatly appreciated.


Solution

  • Here's an answer I found and I hope it helps someone else:

    Foundation Initializer:

    $(function(){ 
        $(document)
            .foundation()
            .foundation('joyride', {modal: true});
    });
    

    Then, when you want to load the joyride:

    $(document).foundation('joyride', 'start');