Bootstrap Tour 未显示在 Bootstrap Twitter 3 模态上 [英] Bootstrap Tour doesn't show on Bootstrap Twitter 3 modal

查看:30
本文介绍了Bootstrap Tour 未显示在 Bootstrap Twitter 3 模态上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,所以我正在将 Bootstrap Tour 与使用 Twitter Bootstrap 3 的项目集成.基本上,一切正常,直到我显示一个模态,然后尝试将一个步骤附加到它.在我调整浏览器大小之前它不会显示.我可以关闭模​​态,但它不存在并调整窗口大小然后显示,所以我不相信这不是 z-index 问题.任何帮助将不胜感激.

Ok, so I am integrating Bootstrap Tour with a project that uses Twitter Bootstrap 3. Basically, everything works fine until I show a modal and then try to attach a step to it. It doesn't show until I resize the browser. I can close the modal and it is not there and resize the window and then it shows, so it isn't a z-index issue I don't believe. Any help would be appreciated.

// Instance the tour
var jag_tour = new Tour();

//Step 1, show info about are submission entry
jag_tour.addStep({
    element: ".submission_entry",
    title: "Sample Signup",
    content: "This is where your snazzy new signups will be found. Click them to show more details.",
    onNext: function(tour) {
        var submission_id_info = $(".submission_entry").attr('id');
        submission_id = submission_id_info.split('_');
        show_submission_info_modal(submission_id['1']);
        jat_tour.start();
    }
});

//Step 2, show our modal popup edit info
jag_tour.addStep({
    element: "#modal_submission_owner_name",
    title: "Prospect Info",
    content: "Need to change the owner of a prospect? How about some details? No problem, just do that here.",
    onPrev: function(tour) {
        $("#view_submission_modal").modal('hide');
    },
});

// Initialize the tour
jag_tour.init();

jag_tour.start();

推荐答案

我成功地在 onNext 块中手动调用了模态.在你的情况下,这看起来像

I've had success with calling the modal manually in the onNext block. In your case, this would look like

onNext: function(tour) {
    var submission_id_info = $(".submission_entry").attr('id');
    submission_id = submission_id_info.split('_');
    show_submission_info_modal(submission_id['1']);
    $('#modal_submission_owner_name').modal
    jat_tour.start();
}

我也很好奇你为什么在这一步调用 jat_tour.start() .看起来你应该只需要在初始化时开始游览,不是吗?

I'm also curious why you call jat_tour.start() in this step. It seems like you should only need to start the tour on initialization, no?

这篇关于Bootstrap Tour 未显示在 Bootstrap Twitter 3 模态上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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