- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我已经在我的项目中实现了 Bootstrap 之旅。我尝试将其加载到模态窗口上,但没有显示任何内容。下面是我的代码:
<script type="text/javascript">
$(document).ready(function () {
// Instance the tour
var tour = new Tour({
steps: [
{
element: "#facility_name_div",
title: "Select Facility",
content: "Change the Displayable Facility. "
}
]});
// Initialize the tour
tour.init();
// Start the tour
tour.start();
});
</script>
我的模态窗口如下:
<!-- Modal -->
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<form class="query_other_order_no_form" id="query_other_order_no_form">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Select Facility : </h4>
</div>
<div class="modal-body">
<div class="box-body">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<div id="facility_name_div"></div>
<label>Please Select a Facility : </label>
<select class="form-control select2 c_bpartner_name" id="c_bpartner_name" required="" style="width: 100%;">
<option selected="selected" value="">Please Select One : </option>
</select>
</div>
<!-- /.form-group -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</div>
<!-- /.box-body -->
</div>
<div class="modal-footer">
<!--<button type="button" id="bpartner_query_btn" class="btn btn-default bpartner_query_btn pull-left">Query</button> <button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>-->
</div>
</form>
</div>
</div>
</div>
请您告诉我如何设置模式窗口上显示的 Bootstrap 游览?
最佳答案
我怀疑您可能遇到了当步骤触发时模态不可见的问题。但是我需要更多背景来确定。您可以检查的一种方法是使用 Bootstrap Tour 中真正有用的部分之一,即 Debug模式。可以将其添加到您的游览对象中,如下所示:
var tour = new Tour({
debug: true,
steps: [
{
element: "#facility_name_div",
title: "Select Facility",
content: "Change the Displayable Facility. "
}
]});
通过添加此行,您的游览将在浏览器控制台中打印出它正在执行的操作。游览将打印出它正在跳过一个步骤,因为该元素不可见,这非常有帮助。
我最近遇到了这个可见性问题,这是一个解决方法(诚然不是最好的),我将其添加到我的游览中上一步的 onNext 函数中。我完全愿意接受更好的解决方法:
onNext: function(tour){
tour.end();
setTimeout(function(){
tour.restart();
tour.goTo(4); //substitute your step index here
}, 500); //change this to as little as your load time allows
}
另一件事需要注意的是模态框和利用 Bootstrap 弹出窗口功能的游览的 z 索引。如果模式可见,并且您的 Debug模式显示当前显示该步骤,则您可能需要调整其中一个或另一个的 z 索引,以确保模式不会隐藏弹出窗口。
关于javascript - Bootstrap Tour 不会加载到模态框上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35221860/
go版本go1.12.9 darwin/amd64 安装 golang.org/x/tour 软件包后,我运行命令 tour 并收到错误: Couldn't find tour files: coul
使用 bootstrap-tour 插件 ( http://bootstraptour.com/ ),我想在除最后一步之外的每个步骤上禁用或隐藏默认的“End Tour”按钮。 我尝试修改步骤模板以完
我正在尝试使用 Bootstrap 主题在 Wordpress 网站上实现 Bootstrap Tour,但到目前为止,每次我尝试链接样式表 (CSS) 和 JavaScrit 时,它都不起作用。该页
正如“A Tour of Go”的 Crawl 示例中提到的命中,我修改了 Crawl 函数,只是想知道为什么“go Crawl”无法生成另一个线程,因为只找到一个 url 被打印出来。 我的修改有问
HTML: button JS: var tour = new Tour({ steps: [{ element: "#enrol-btn1", title: "Exam Enrolm
我正在尝试使用 vue-tour,按照指南中的确切步骤我收到了这个错误 https://github.com/pulsardev/vue-tour 步骤 在 main.js 上添加 vue-tour
我正在尝试使用DFS制作程序骑士之旅,但我无法解决这个程序..因为我总是有这样的消息错误 线程“AWT-EventQueue-0”中的异常java.lang.ArrayIndexOutOfBounds
我真的可以使用帮助来关闭我正在构建的网页的 Bootstrap Tour 插件的“自动启动”功能。这次旅行本身效果很好。它按照预期从一步跳到另一步。但是,当用户第一次查看页面时,导览会自行开始。用户可
我正在使用 Bootstrap 游览,但问题是我只需要游览/突出显示不正确的字段。 Bootstrap 游览的问题在于硬编码所有元素 id 或类名。我遇到的表单错误是基于不正确的字段。因此,我无法对字
我们可以通过获取当前步骤元素 var step = tour._options.steps[tour.getCurrentStep()]; var element=$(step.element); 与
我一直在尝试使用“Bootstrap Tour”在我的网站上安装一个导览,我对 Javascript 和一般编码还很陌生,而且我已经做了一整天。我想我会来这里问更有经验的人。 hi1 有时会起作用,但
我对 Bootstrap tour 有疑问. 我的问题 当我从一个页面重定向到另一个页面时,init 函数将被调用,但不会自动继续浏览。所以 Bootstrap 之旅不会显示。该页面还包含一个 AJA
我在这里发帖是因为我无法在 Boostrap Tour 的官方文档或此处的任何其他主题中找到解决我的问题的方法。 这是我的问题:我有一个页面,我想在其中初始化两个游览,以便让我的用户选择从哪一个开始。
我通过我的网站进行了游览。我希望用户在结束游览后可以通过单击按钮手动开始游览。 按钮: Start Tour Bootstrap 游览脚本。 var tour = new Tour(); tour
我正在尝试突出显示表格行。即使有了针对 z-indexes 等的 Bootstrap 修复 github issue link 看看这个 fiddle :jsFiddle JavaScript $("
我在我的网站“Drupal 8”上安装了下一个模块“D8:Bootstrap Tour”,它使用主题“Bootstrap 3”。 https://www.drupal.org/project/bs_t
以下是我的引用代码: 我正在为我的应用程序使用 Bootstrap 游览。 要求: 当我点击“下一步”时,我处于第一步,然后它正在检查“#id2”的值。如果 id2 值不为空,则应跳过该步骤并直接进入
我已经在我的项目中实现了 Bootstrap 之旅。我尝试将其加载到模态窗口上,但没有显示任何内容。下面是我的代码: $(document).ready(function (
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 我们不允许提问寻求书籍、工具、软件库等的推荐。您可以编辑问题,以便用事实和引用来回答。 关闭 8 年前。
我正在玩 Bootstrap Tour,我发现自己卡在了导航页面上。 在我的导览中,第四步将用户从 index.cshtml 带到 page.cshtml,这工作正常,但是导览框不会在 page.cs
我是一名优秀的程序员,十分优秀!