i want to close / destroy intro js when i click .citysubmit button

function introjsstart(){
  introJs().setOption('keyboardNavigation', false).setOptions({
    steps: [
      {
        element : document.querySelector('.stepPremium1'),
        intro: "<p>{{ trans('premium.facebook.intro.intro1') }}</p>",
        position: 'top'
      },{
        element : document.querySelector('.stepPremium2'),
        intro   : '<p>{{ trans('premium.facebook.intro.intro2') }}</p>',
        position: 'top'
      }
    ]
  }).start()
}

when i press this intro js should be done

$(".citysubmit").click(function(){
    //how to destroy intro js?
});

1 Answers

0
xNavid On

As written in the Intro.js documentation you can exit by using exit() function in your code:

introJs().exit()