0
我的主頁上有一個顯示工具提示的JQuery幻燈片(使用插件Tooltipster http://calebjacob.com/tooltipster/),每次您將鼠標懸停在其中一張幻燈片圖片上。我想要做的就是每次使用JQuery單擊幻燈片上的下一個按鈕時,延遲加載Tooltipster。這是我的語法到目前爲止:JQuery Tooltipster延遲點擊
<!--- Load Tooltipster plugin -->
<script>
$(document).ready(function() {
$('.tooltip').tooltipster();
});
</script>
<!--- Delay the plugin load every time next_button is clicked -->
<script>
$(document).ready(function() {
$(".next_button").bind("click",function() {
setTimeout(function() {
$('.tooltip').tooltipster();}, 200);
});
});
</script>
但是,這是行不通的。我哪裏錯了?
是啊對不起,我錯了。但是這並不能解決問題。 – 2013-04-27 09:35:08
@MatthewCooper嘗試使用'on()'而不是'bind()' – Eli 2013-04-27 09:50:13
仍然不起作用。我必須停止「$('。tooltip')。tooltipster();」之前我可以將其設置爲超時? – 2013-04-27 09:53:59