jQuery event not raised in Gridview TH
<p>I have a gridview that fill it with some data.</p>

<pre><code>&lt;asp:GridView ID="GridView1" runat="server" ClientIDMode="Static"&gt;
&lt;/asp:GridView&gt;
</code></pre>

<p>code:</p>

<pre><code>    if (!IsPostBack)
    {
        using (DataClassesDataContext dc = new DataClassesDataContext())
        {
            GridView1.DataSource = dc.Regions.ToList();
            GridView1.DataBind();
        }
    }
</code></pre>

<p>I want when I clicked on <code>TH</code> section an alert showed.I wrote this code:</p>

<pre><code>   &lt;script type="text/javascript"&gt;
    $('#GridView1 th').on("click", function () {
        alert("nima");
     });   
&lt;/script&gt;
</code></pre>

<p>but it doesc not work.where is my mistake?</p>

<p>thanks</p>

<hr>

<p><strong>Edit 1)</strong>
I Edit main question and add <code>'</code> for selector.I forgot to type that.
the problem is when I write this code it works.I want to know on does not work:</p>

<pre><code>$('body').live('click','#GridView1 th', function () {
        alert("hello");
    });  
</code></pre>
