我從來沒有見過任何人這樣做過。任何人都可以在這方面啓發我嗎?這是從here。
jQuery(function ($) { //What's with the $ as an argument?
$('#flux').bind('scroll', function() {
if ($(this).scrollTop() + $(this).innerHeight() >= $(this)[0].scrollHeight) {
alert('end reached');
}
})
});
看來他可以聲明一個函數並同時運行它。
是隻有「$」參數的這個問題,還是這是您第一次遇到jQuery代碼? –
http://learn.jquery.com/using-jquery-core/document-ready/ –
@ArlaudPierre不,先生,我不知道這是另一種方式來做$(document).ready();.在另一個說明中,我只是在沒有$參數的情況下測試了這個函數,它無論如何工作它有什麼用途? – geoyws