[英]jQuery.appear plugin is not working
請看下面的jsfiddle。 這是一個簡單的嘗試,讓jQuery.appear插件工作。 我究竟做錯了什么?
html是:
<div class = 'bar'>foo</div>
這是相關代碼:
alert('foo bar');
$('.bar').appear();
$('.bar').on('appear', AlertMe);
function AlertMe() {
alert("alert me");
}
1)出現在滾動或調整大小時觸發事件(在第79行引用你的javascript小提琴)
$(window).scroll(on_check).resize(on_check);
2)使代碼正常工作如下:
$(function(){
... your code goes here
});
因此在加載庫之前不會執行它。
希望這可以幫助
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.