當我打開我的網頁使用jQuery的,我得到以下錯誤:jQuery的錯誤在啓動時
Uncaught TypeError: Cannot call method 'call' of undefined
jQuery.jQuery.fn.jQuery.ready test.html:282
(anonymous function) test.html:15
jQuery.jQuery.extend.ready
這上面追查到
ready: function(fn) {
// Attach the listeners
jQuery.bindReady();
// If the DOM is already ready
if (jQuery.isReady) {
// Execute the function immediately
fn.call(document, jQuery);
^^^^^^^^^^^^
// Otherwise, remember the function for later
} else if (readyList) {
// Add the function to the wait list
readyList.push(fn);
}
FN是不確定的......有我能看到的其他症狀並不是我指出的問題。我引用了jquery.js的本地副本。
<script src="js/jquery-1.4.4.js" type="text/javascript"></script>
使用谷歌的CDN並沒有幫助..不能想象我打這個第一人......
任何人只要有三分球,幫助新手?
在此先感謝, 雅
發佈您的html頁面的源代碼,包括您正在執行的所有腳本。你是否使用除jQuery之外的另一個JS庫? – 2010-12-17 23:07:36
您在哪裏以及如何定義fn函數作爲fn傳遞? – Javi 2010-12-17 23:09:58