zurb / joyride

jQuery feature tour plugin.
http://www.zurb.com/playground/jquery-joyride-feature-tour-plugin
1.42k stars 241 forks source link

postRideCallback runs whether cancelled or complete - is there a way of distinguishing between these? #203

Open awidgery opened 9 years ago

robinfhu commented 7 years ago

Yes. The postRideCallback is passed three arguments. The last argument is isAborted. The isAborted flag is set to true if the tutorial was cancelled via the close button.

raffaelmeier commented 7 years ago

can you specify how to use that function (isAborted) in a short example? I am not managing to get it to work... thanks in advance...

raffaelmeier commented 7 years ago
      $(window).load(function() {
          $("#joyRideTipContent").joyride({
              autoStart : true,
              postRideCallback :function() { if (this.isAborted == true ) { window.alert('hello world');  } // or whatever you want to call
                            }
          });
        });

does not work