Change all instances of object to iframe for IE using Jquery

Posted by geckomist on Stack Overflow See other posts from Stack Overflow or by geckomist
Published on 2010-05-20T21:15:14Z Indexed on 2010/05/22 8:30 UTC
Read the original article Hit count: 167

Filed under:
|
|
|
|

I was wondering if it would be possible to use jquery to change all object tags on a site automatically to iframe for IE 8 and below. I would like this so that it can be xhtml 1.1 valid and not have to be double coded all the time and you would not have to focus on non-standard browsers.

The data attribute would have to be changed to src, I would like frameborder="0" to be inserted, and all styles set to the object tag also set to the iframe tag.

I don't want this to turn into a debate on iframes vs objects, I just thing this would be a huge time saver and would encourage proper strict xhtml coding.

Thanks for any input!

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about iframe