0

Is there a way to destroy the joyride provided by Zurb Foundation problematically. I am trying to destroy the joyride like this

$('#joyride-list-location-creation').joyride('destroy');

But I am getting this error

Uncaught TypeError: $(...).joyride is not a function(…)

mohsinali1317
  • 4,255
  • 9
  • 46
  • 85

1 Answers1

0

I'm using version 2.1 of joyride.

There is a 'destroy' function in the source code

For my usage, I needed to destroy it when it closed, so I added a call to destroy in the postRideCallback.

Like this:

$('#incompleteJoyRide').joyride({
        autoStart : true,
        postRideCallback: function () {
            $('#incompleteJoyRide').joyride('destroy');
        },
        modal:true,
        expose: true,
        animate: true
    });
aljachimiak
  • 356
  • 2
  • 5