using jquery with a user script
<p>I want to get div id. in div, if a tag contains textToSearch, I want to hide it. How to do this?</p>

<p>Also I want to run this script before page load. I don't want to see page's pass.</p>

<p>Here is my code :</p>

<pre><code>&lt;div class="main"&gt;
  &lt;div class="content"&gt;
     &lt;div class="whitebox"&gt;
            &lt;div class="content"&gt;
                &lt;div id="t512848" class="entry0"&gt;
                     &lt;a&gt;test&lt;/a&gt;
                &lt;/div&gt;
                &lt;div id="t512849" class="entry0"&gt;
                     &lt;a&gt;galatasaray!&lt;/a&gt;
                &lt;/div&gt;
            &lt;/div&gt;
     &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>User Script 
...</p>

<pre><code>function main($) {
    textToSearch = "test";
    $(".content").children().each(function(n, i) {
    var id = this.id;
    $('div.entry0').each(function(index){
        var that = this;
        $(this).find("a:contains('"+textToSearch+"')").each(function(index) {               
            //$(#id).hide();
            console.log(this);
        });
    }); 
   });
}

addJQuery(main);
</code></pre>
