JavaScript or jQuery, how to find element
<p>I have the following HTML:</p>

<pre><code>&lt;div data-name="countrySelectorRoot"&gt;
    &lt;select&gt;
        &lt;option value="C1"&gt;Country 1&lt;/option&gt;
        &lt;option value="C2"&gt;Country 2&lt;/option&gt;
        &lt;option value="C3"&gt;Country 3&lt;/option&gt;
        &lt;option value="C4"&gt;Country 4&lt;/option&gt;
        &lt;option value="C5"&gt;Country 5&lt;/option&gt;
    &lt;/select&gt;

    &lt;script type="text/javascript"&gt;
        // Some script which finds parent div...
    &lt;/script&gt;
&lt;/div&gt;
</code></pre>

<p>Inside script, I need code which needs to find my "countrySelectorRoot" div <code>(var MyRoot = // Code that finds element with data-name="countrySelectorRoot").</code></p>

<p>However, I can have multiple divs with same data-name attribute and same contents,
but I need to find the the specific one which is the parent of the script.</p>

<p>How to do this?</p>
