Stumbled upon this blog post today while looking for help debugging an IE8 flaw. I was using jQuery .wrap() to dynamically add an anchor tag to an image, and it worked in all browsers but IE8 (of course!).
While this might not be the only reason it doesn’t work, the solution presented on the page linked previously is to make sure the html you’re providing as the wrapper has a closing tag, which according to jQuery it’s not supposed to need.
However, this works in IE8:
And this does not:
Notice the only difference is the html inside the .wrap() of the second one does not have a closing tag.