I’m using jQuery 1.6.1 and I have some code that’s erroring out in IE7, saying
Unexpected call to method or property access.
jquery.min.js, line 17 character 28710
That line is a call to
this.appendChild(a)
which is inside the .html() method.
My problem is that the code I have errors out when ran normally, but if I use IE’s debugger and F10 (step) through the code, it works! This leads me to believe it’s a synchronization issue with the .html() method itself. Has anyone else experienced this?
This usually happens when you are using .html() on HTML 5 elements in IE. You have to initialize an HTML 5 shiv first. Modernizr supports the Shiv plus many other useful features. Also have a look at innverShiv for setting innerHtml.