Zurb Joyride not following defined order

瘦欲@ 提交于 2019-12-11 01:48:59

问题


Please review my Sample Fiddle...

When it initiates, it starts with the First Stop, and moves onto the Second and Third Stops. When it's ready to move onto the Fourth Stop, it skips and immediately jumps to a modal.

Everything is setup the way the documentation states.

This is the script to call the function...

  $(window).load(function() {
    $('#joyRideTipContent').joyride({
      autoStart : true,
      postStepCallback : function (index, tip) {
      if (index == 2) {
        $(this).joyride('set_li', false, 1);
      }
    },
    modal:true,
    expose: true
    });
  });

I'm completely lost as to why an item is completely skipped over.


回答1:


You code works as expected if you remove the postStepCallback function:

postStepCallback : function (index, tip) {
      if (index == 2) {
        $(this).joyride('set_li', false, 1);
      }
    }

if you don't need it, don't use it.

Demo: http://jsfiddle.net/IrvinDominin/jeWTv/



来源:https://stackoverflow.com/questions/19011243/zurb-joyride-not-following-defined-order

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!