搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

$(document).ready(function() can't be excute

  • 2 回覆
  • 21 有這個問題
  • 2 次檢視
  • 最近回覆由 jmogollon

more options

$(document).ready(function() jquery can`t be excute in firefox,but in ie 8 ,no problem!

$(document).ready(function() jquery can`t be excute in firefox,but in ie 8 ,no problem!

所有回覆 (2)

more options

Is this a web site you maintain or develop? You can find more focused web development help on the mozillaZine Web Development board. Separate forum, separate registration. Please note the tips in the Sticky Post at the top of the forum before posting.

If this is an error you get when visiting a site, what site is it? Please reply with the URL and the steps needed to re-create the error.

more options

I got this also, and I'm using asp.net with jquery on client side, suddenly I discover that this function was not working on Firefox, and the reason why is because I was using a direct object reference inside this function example:

Client Script:

...

objDiv.style.display = 'none';

...

Html:

...

<div id='objDiv'></div>...

All code after the script reference was not running, so I change the code to:

...

var obj = $get('objDiv');

obj.style.display = 'none';

...

And it start working, you can change the $get() function for any other like getElementbyId or jquery function, after this all the code was working.

Hopes that help

由 jmogollon 於 修改