Why is IE running jQuery ready twice?

By Sam Deering

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:
See for more info on this version

See bug tickets for more info:


Use latest version of jQuery:

Free Guide:

7 Habits of Successful CTOs

"What makes a great CTO?" Engineering skills? Business savvy? An innate tendency to channel a mythical creature (ahem, unicorn)? All of the above? Discover the top traits of the most successful CTOs in this free guide.

No Reader comments

Because We Like You
Free Ebooks!

Grab SitePoint's top 10 web dev and design ebooks, completely free!

Get the latest in JavaScript, once a week, for free.