Reputation:
I am currently using this function to add to the style attribute of posternew imgframe div's:
$(function () { $('.posternew .imgframe').each(function () {
$(this).attr("style", $(this).attr("style").replace("background:", ""));
$(this).attr('style', 'background:url(images/new.png),' + $(this).attr('style'));
});
});
This works perfectly in Chrome and Firefox, but will not under IE 9 or 10. I've tried formatting it slightly differently, but to no avail. Any ideas as to why this will not work in IE?
This creates this html in Chrome and Firefox:
<div class="imgframe" style="background:url(images/new.png), url(images/boxart/blah.jpg);"></div>
But in IE shows:
<div class="imgframe"/>
Upvotes: 0
Views: 357