Ticket #7574 (closed bug: worksforme)
Problem with html() in IE
| Reported by: | songofchrist@… | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | 1.5 |
| Component: | unfiled | Version: | 1.4.3 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
I have something to the effect of the following in a portion of my code.
$('#'+id).html('blah');
After being called once, a second call to the routine in which this appears is producing an error "'events' is null or undefined" in IE 6.0, although it works fine in Mozilla based browers. After finding the error, I replaced it with the following:
document.getElementById(id).innerHTML='blah';
The error went away. Now these two statements are essentially equivalent for all practical purposes. Why then the error in 'events' of all things when I attempt to insert html via jQuery? Don't know if this is still a problem in the newest jQuery. Might be solved by upgrading.
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Thanks for taking the time to contribute to the jQuery project by reporting a bug!
This seems to work just fine. test case. Clicking multiple times doesn't yield an error in IE.
So please submit a reduced test case which reproduces the issue you are experiencing on http://jsfiddle.net. So that we can investigate this issue further. And also make sure to test with the latest jQuery version too.
How to report bugs