Twitter Bootstrap 工具提示在页面更改时中断,因为 $(document).ready
Twitter Bootstrap tooltips break on page change because of $(document).ready
因为jQuery $(document).ready只触发一次。我的 Twitter 引导工具提示在更改页面时中断。
我目前使用下面这样简单的东西来初始化我的工具提示:
$(function () {
// for tooltips
$('body').tooltip({
selector: '[rel=tooltip]'
});
});
有没有更好的方法可以解决这个问题?
找到了答案!
var ready;
ready = function() {
...your javascript goes here...
};
$(document).ready(ready);
$(document).on('page:load', ready);
相关文章:
- 正在寻找比$(document).ready慢的$(window).load的替代方案
- document.open/document.write没有正确地清除chrome中的文档——这是chrome的错误吗
- 如何用更合适的内容替换document.write
- onclick函数需要双击,因为类分配延迟
- document.styleSheets不返回任何内容
- jQuery document.ready not working
- $(document).height()在刷新时随机化值(Safari 5.1.10)
- reactjs this.refs vs document.getElementById
- 如何通过adf中的document.getElementById获取inputText字段值
- window.opener.document在ie中不起作用
- contentWindow.document.body is null
- document.applet.method在Mounatin Lion上抛出safari 6+JDK7异常
- 在ES6中,模块将导致多个网络调用,因为两个模块不能在单个文件中定义
- document.getElementById(“st”).click();不起作用
- $(document).height和$(window).heaght都返回相同的值-使用的是正确的doctype
- 我可以'Don’我不想让我的程序继续下去;m使用document.write,因为它在html中使用JavaSc
- Jquery on event 不与选择器一起工作,因为它与 Jquery(document) 一起工作
- 脚本执行受阻,因为document's框架被沙盒化了——Angular应用
- 代码不能运行,因为我不能在document.write中输出多个变量
- Twitter Bootstrap 工具提示在页面更改时中断,因为 $(document).ready