Foundation Joyride Never show again

121 Views Asked by At

I am using Foundations Joyride plugin in my web app. What I am trying to achieve is something like where the user can say that never show me again button on each step.

For example I am on the first item their I want two buttons, Next/Don't show again.

Is there a way to get that?

1

There are 1 best solutions below

0
PJeffes On

I had this issue and solved it by making a separate popup in the same style which came up to prompt the user to do something else (in this case start a video) or start the joyride.

On this we also included a checkbox called 'never show me this again' and then stored the result in a cookie to make sure the box didn't auto-popup when reloading the page.

The following code should help (you will need to set or clear the 'show_joyride' cookie yourself - we use js.cookie.js):

var showJoyride = Cookies.get('show_joyride');

// Setup joyride but tell it not to auto start
$("#joyRideTipContent").joyride({
  autoStart : false,
  modal:true,
  expose: true
});

if(showJoyride == 'true'){

  // Start the joyride
  $("#joyRideTipContent").joyride({
     modal:true,
     expose: true
  });

}