zurb / joyride

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

Disable cookie monster flag after first tour #40

Open bisware opened 12 years ago

bisware commented 12 years ago
<a href="#" id="openTour">First time here? Take a tour</a>

<ol id="joyRideTipContent">
  <li data-class="numero1" data-text="Next">
    <h2>Stop #1</h2>
  </li>
  <li data-id="numero2" data-button="Next">
    <h2>Stop #2</h2>
  </li>
  <li data-id="numero3" data-button="Next">
    <h2>Stop #3</h2>
  </li>
</ol>

$('#openTour').click(function (e) {
    e.preventDefault(); 
    $('#joyRideTipContent').joyride({
        'postRideCallback' : function () {
            $(this).joyride('destroy');
        },
        cookieMonster: false
    });
});

$('#joyRideTipContent').joyride({
    'postRideCallback' : function () {
        $(this).joyride('destroy');
        },
    cookieMonster: true
});

I'd like to reset and turn off the cookie monster flag, if che user click on the "Take a tour" link, but the tour skip some steps.

ratamacue commented 12 years ago

This might be a duplicate of: https://github.com/zurb/joyride/issues/38

bisware commented 12 years ago

No. I want to show the tour only the first time you enter in the page. Second visit, no tour, but if you want to see again, I have to disable the cookie monster flag.