如何配置基础joyride插件回调 [英] how to configure foundation joyride plugin callbacks

查看:101
本文介绍了如何配置基础joyride插件回调的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用基础4.3.1。
这是我的代码:

I'm using foundation 4.3.1. This is my code:

$(document).foundation('joyride', {
    postRideCallback: function () {
        alert('test')
    }
});
$(document).foundation('joyride','start');

我似乎无法提醒('测试')
它去了通过骑,但没有。不知道我在这里做错了什么。文档根本不清楚如何或在何处放置配置选项,它们只提供它们的列表。

I can't seem to get it to alert('test') It goes through the ride, but then nothing. Not sure what I'm doing wrong here. The docs aren't clear at all on how or where to put the config options, they only provide a list of what they are.

为什么postRideCallback不会触发?

Why won't the postRideCallback trigger?

推荐答案

我自己也很难过。在基础5中,解决方案如下。参考自: https://github.com/zurb/foundation/issues/4468

Had a hard time with this myself. In foundation 5, solution is below. Referenced from: https://github.com/zurb/foundation/issues/4468

$(document).foundation({
  joyride: {
    post_ride_callback : function () {
      alert('yay');
    }
  }
 }).foundation('joyride', 'start');

这篇关于如何配置基础joyride插件回调的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆