文章出處
文章列表
$( "a.offsite" ).live( "click", function() { alert( "Goodbye!" ); // jQuery 1.3+ });
//下面兩個,第一個dom元素,不應該出現在第二個選擇器中 $( document ).delegate( "a.offsite", "click", function() { alert( "Goodbye!" ); // jQuery 1.4.3+ }); $( document ).on( "click", "a.offsite", function() { alert( "Goodbye!" ); // jQuery 1.7+ });
文章列表
全站熱搜