title: How to target an item in an iframe with jquery
body: <p>How do I target and item in an iframe thats on my site and change the inline value?</p>
  
  <pre><code>&lt;iframe class="preview_iframe"&gt;
  &lt;div id="example"&gt;
  &lt;a id="ex"&gt;
  &lt;svg fill="#000000"&gt;&lt;/svg&gt;
  &lt;/a&gt;
  &lt;/div&gt;
  &lt;/iframe&gt;
  </code></pre>
  
  <p>I need to target an SVG (multiple) in an iframe and change the fill (color) with jquery, how can I do this I tried but it doesn't seem to select it.</p>
  
  <p>Heres the jquery im trying</p>
  
  <blockquote>
  <pre><code>         $("[id^=like_iframe_]").load(function() {
              var frame = $("[id^=like_iframe_]").contents();
              $("svg", frame).css({'fill' : 'red'});
             });
  </code></pre>
  </blockquote>
  
  <p>And</p>
  
  <pre><code>$("[id^=like_iframe_]").contents().find("svg").css({'fill' : 'red'});
  </code></pre>
  
  <p>Its selecting the frame, but it's not changing the color of the svg </p>