Search a page source for an attr, then find that attr's parent div
<p>I'm wanting to find the parent div ID in javascript (or jquery), by searching HTML src for a specific attribute, or text.</p>

<p>Let's say that we're using this code:</p>

<pre><code>&lt;div id="ad_creative_1" class="ad-div mastad" style="z-index: 1;"&gt;
&lt;script&gt;(function() {var loaded = function() {return yt &amp;&amp; yt.www &amp;&amp; yt.www.home &amp;&amp; yt.www.home.ads;};window.masthead_ad_creative_iframe_1_workaround = function() {if (loaded()) {yt.www.home.ads.workaroundIE(this);}};window.masthead_ad_creative_iframe_1_onload = function() {if (!loaded()) {setTimeout(masthead_ad_creative_iframe_1_onload, 50);return;}yt.www.home.ads.workaroundLoad();};})();&lt;/script&gt;

      &lt;iframe id="ad_creative_iframe_1" src="http://ad-g.doubleclick.net/N4061/adi/com.ythome/_default;sz=970x250;tile=1;plat=pc;dc_dedup=1;kage=18;kar=3;kbsg=HPUS130404;kcr=us;kga=1001;kgender=m;kgg=1;klg=en;kmyd=ad_creative_1;"
              height="250" width="970"
              scrolling="no" frameborder="0" style="z-index: 1"
              onload="masthead_ad_creative_iframe_1_onload();"
              onmouseover="masthead_ad_creative_iframe_1_workaround(this)"
              onfocus="masthead_ad_creative_iframe_1_workaround(this)"&gt;&lt;/iframe&gt;
        &lt;script&gt;
    (function() {
          var ord = Math.floor(Math.random() * 10000000000000000);
          var adIframe = document.getElementById("ad_creative_iframe_1");
          adIframe.src = "http://ad-g.doubleclick.net/N4061/adi/com.ythome/_default;sz=970x250;tile=1;plat=pc;dc_dedup=1;kage=18;kar=3;kbsg=HPUS130404;kcr=us;kga=1001;kgender=m;kgg=1;klg=en;kmyd=ad_creative_1;ord=" + ord + "?";
    })();
  &lt;/script&gt;

    &lt;/div&gt;
</code></pre>

<p>Without knowing that the parent div is ad_creative_1, is it possible (and if so, how would i go about it?) to figure out the parent div by searching for a keyword within the source?</p>

<p>Say doubleclick.net is our keyword.</p>

<p>Can I search an html pages source, find doubleclick.net, and return the parent div of the section that has doubleclick.net in it?</p>

<p>How would i go about this?</p>
