I am creating an object element dynamically in jQuery, to render some content. It works in all browsers except IE8.
The code:
    j$(document).ready(function(){ 
        j$('.objContainer').html(j$('<object>').attr(
                            {'data':'http://www.stackoverflow.com',
                             'type':'text/html'}));
    });
The HTML structure created after the execution(in IE8):
    <object type="text/html"></object>
In other browsers[IE9, Firefox, Chrome]:
    <object data="http://www.stackoverflow.com" type="text/html"></object>
Any solutions?
Works for me: using the IE8 developer tools, I can see the data attribute. Here's a screenshot.
(I know I shouldn't have to say it, but: you need to make sure that you're allowing scripts to run.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With