How do I target and item in an iframe thats on my site and change the inline value?
<iframe class="preview_iframe">
<div id="example">
<a id="ex">
<svg fill="#000000"></svg>
</a>
</div>
</iframe>
I need to target an SVG (multiple) in an iframe and change the fill (color) with jquery, how can I do this I tried these they don't seem to work
Heres the jquery im trying
$("[id^=like_iframe_]").load(function() {
var frame = $("[id^=like_iframe_]").contents();
$("svg", frame).css({'fill' : 'red'});
});
And
$("[id^=like_iframe_]").contents().find("svg").css({'fill' : 'red'});
Its selecting the frame, but it's not changing the color of the svg
Heres a link http://absdfsderedfdsfrr.tumblr.com/ to see what im working on