有什么区别
$(function(){
});
and
$(document).ready(function() {
});
什么都没有。 http://api.jquery.com/jQuery/#jQuery3
这个函数的行为就像
$(document).ready(),因为它应该
用于包装其他 $()
您可以在源代码 http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.js:
rootjQuery = jQuery(document);
...
} else if ( jQuery.isFunction( selector ) ) {
return rootjQuery.ready( selector );
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)