2017-09-14 9 views
0

https://github.com/brandonaaron/livequery .livequery()の構文を見つけようとしていました。私は公式ドキュメントであり見ることができるものから、.livequery()は、2つのまたは3つのパラメータを受け取ることができます。.livequery()は1つのパラメータのみを受け取った場合、どのように動作しますか?

// selector: the selector to match against 
// matchedFn: the function to execute when a new element is added to the DOM that matches 
$(...).livequery(selector, matchedFn); 

// selector: the selector to match against 
// matchedFn: the function to execute when a new element is added to the DOM that matches 
// unmatchedFn: the function to execute when a previously matched element is removed from the DOM 
$(...).livequery(selector, matchedFn, unmatchFn); 

は、しかし、私は検討していますソースコードで、私は.livequery()はパラメータを1つだけ受信ご覧ください。例えば:私は公式ドキュメントで見たものに基づいて理解し、何から

$('.js-truncate').livequery(function() { 
    .................................. 
}); 

は、.livequeryの最初のパラメータは、()は常に「セレクタ」です。 .livequery()が単一のパラメータを受け取ると、それはどういう意味ですか?私の場合、このパラメータは?:function(){.......}です。ありがとうございました。

答えて

0

jQueryをアップグレードして以来、これからは.onを使用するため、今は私とは無関係です。

関連する問題