Skip to main content

Why is IE running jQuery ready twice?

By Sam Deering

JavaScript

Share:

I ran into this problem while developing a jQuery plugin and was testing it on IE7 (don’t ask).

I was thinking… why the hell is IE running my jQuery code twice! I knew it was because i had an alert statement and it was being shown twice (the same document ready function firing twice). Then found out that this is a known bug for earlier versions of jQuery when used in IE the best fix is to update to the latest version.

Versions know to cause this bug:
1.4.3,1.4.4
See for more info on this version
http://blog.jquery.com/2010/11/03/jquery-1-4-4-release-candidate-2-released/

See bug tickets for more info:
http://bugs.jquery.com/ticket/13
http://bugs.jquery.com/ticket/7310
http://bugs.jquery.com/ticket/7273

FIX:

Use latest version of jQuery:

Sam Deering has 15+ years of programming and website development experience. He was a website consultant at Console, ABC News, Flight Centre, Sapient Nitro, and the QLD Government and runs a tech blog with over 1 million views per month. Currently, Sam is the Founder of Crypto News, Australia.

Integromat Tower Ad