Reputation: 2055
My website has an external widget that displays a table.
The widget comes with some inline CSS. Is there a way to remove this CSS before appending the widget to my page, so that only my css file rules will apply?
The markup looks like this:
<div id="widgetContainer">
<script language='javascript' src='http://www.esake.gr/scripts/create_widget.php?pw=1&maw=242&fof=Verdana&tifs=14&tic=3A3A3A&tibc=FFFFFF&dafs=12&dac=3A3A3A&dabc=FFFFFF&ces=0&cep=1&langid=gr'></script>
</div>
Upvotes: 0
Views: 79
Reputation: 6996
You can do this using jQuery,
Assuming you'd have a parent container for your widget, you could do the following,
$("#parentContainer").children().removeAttr("style");
Just created a quick mockup here: http://jsfiddle.net/j3GPL/
Upvotes: 1