0
是什麼jQuery函數的區別
$(document).ready(function() {
//some code here
});
和
$(function() {
//some code here
});
我覺得他們使用同樣的目的之間的差異。
是什麼jQuery函數的區別
$(document).ready(function() {
//some code here
});
和
$(function() {
//some code here
});
我覺得他們使用同樣的目的之間的差異。
他們是同一件事:http://docs.jquery.com/Core/jQuery#callback
簡寫爲$(文件)。就緒()。
這是$(document).ready()
的快捷方式/別名。
這裏是你可能想讀的東西:
Introducing $(document).ready()