zurb / joyride

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

Close tip when input changed? #172

Closed fredkelly closed 10 years ago

fredkelly commented 10 years ago

I'm using joyride to attach tips to a number of form elements to give contextual information. I would like to hide the associated tip when the user changes the field, without ending the joyride sequence (i.e. the next tip in the sequence would be shown).

Right now I am using the following to hide the tip, but I need to somehow trigger next_tip() so the joyride continues to the next input.

Is there a better way of doing this?

$(document).ready(function() {
  $(document)
    .foundation({
      joyride: {
        pre_step_callback: function(index, tip) {
          this.$target.on('focus', function(e) { tip.hide(); })
        }
      }
    })
    .foundation('joyride', 'start');
});
fredkelly commented 10 years ago

Moved to zurb/foundation#4661