jQuery click function on gridview tr
<p>Im working on a project that filters lots of infomation into a gridview, this gridview is inside an updatepanel and i got the RowDataBound event programmed to set a css class on each row since doing it manualy doesen´t seem to work... The class gets added but i now need to toggle a class on tr click. I've been trying with jQuery but it doesen't seems to work (it works perfectly on elements outside the table).</p>

<p><a href="https://jsfiddle.net/86coxqr1/" rel="nofollow">Fiddle of what I want</a></p>

<p>Heres my gridview</p>

<pre><code>&lt;asp:UpdatePanel ID="UpdatePanel5" runat="server"&gt;
    &lt;ContentTemplate&gt;
        &lt;asp:GridView ID="gridTabla" runat="server" BorderColor="White" EnableSortingAndPagingCallbacks="True" GridLines="Horizontal" AutoGenerateColumns="False"&gt;
            &lt;AlternatingRowStyle BackColor="#F0F0F0" BorderColor="#F0F0F0" BorderStyle="Solid" /&gt;
            &lt;Columns&gt;
                &lt;asp:BoundField AccessibleHeaderText="codesc" DataField="CodEscuela" HeaderText="Cod" /&gt;
                &lt;asp:BoundField AccessibleHeaderText="esc" DataField="Escuela" HeaderText="Escuela" /&gt;
                &lt;asp:BoundField AccessibleHeaderText="codar" DataField="codCarrera" HeaderText="Cod" /&gt;
                &lt;asp:BoundField AccessibleHeaderText="car" DataField="Carrera" HeaderText="Carrera" /&gt;
                &lt;asp:BoundField AccessibleHeaderText="codmat" DataField="codMateria" HeaderText="Cod" /&gt;
                &lt;asp:BoundField AccessibleHeaderText="materia" DataField="Materia" HeaderText="Materia" /&gt;
                &lt;asp:BoundField AccessibleHeaderText="nom" DataField="Nomina" HeaderText="Nomina" /&gt;
                &lt;asp:BoundField AccessibleHeaderText="prof" DataField="Profesor" HeaderText="Profesor" /&gt;
                &lt;asp:BoundField AccessibleHeaderText="noalumnos" DataField="noAlumnos" HeaderText="Numero de alumnos" /&gt;
                &lt;asp:BoundField AccessibleHeaderText="noregistros" DataField="noRegistros" HeaderText="Numero de Registros" /&gt;
                &lt;asp:BoundField AccessibleHeaderText="periodo" DataField="Periodo" HeaderText="Periodo" /&gt;
                &lt;asp:BoundField AccessibleHeaderText="np" DataField="NP" HeaderText="NP" /&gt;
                &lt;asp:BoundField AccessibleHeaderText="ni" DataField="NI" HeaderText="NI" /&gt;
                &lt;asp:BoundField AccessibleHeaderText="diez" DataField="Diez" HeaderText="10" /&gt;
                &lt;asp:BoundField AccessibleHeaderText="nueve" DataField="Nueve" HeaderText="9" /&gt;
                &lt;asp:BoundField AccessibleHeaderText="ocho" DataField="Ocho" HeaderText="8" /&gt;
                &lt;asp:BoundField AccessibleHeaderText="siete" DataField="Siete" HeaderText="7" /&gt;
                &lt;asp:BoundField AccessibleHeaderText="seis" DataField="Seis" HeaderText="6" /&gt;
                &lt;asp:BoundField AccessibleHeaderText="cinco" DataField="Cinco" HeaderText="5" /&gt;
                &lt;asp:BoundField AccessibleHeaderText="bantutor" DataField="BandTutor" HeaderText="Reportes de tutor" /&gt;
                &lt;asp:BoundField AccessibleHeaderText="banddir" DataField="BandDirector" HeaderText="Reportes de director" /&gt;
            &lt;/Columns&gt;
            &lt;RowStyle BorderStyle="None" HorizontalAlign="Center" VerticalAlign="Middle" /&gt;
        &lt;/asp:GridView&gt;
    &lt;/ContentTemplate&gt;
&lt;/asp:UpdatePanel&gt;
</code></pre>

<p>My RowDataBound</p>

<pre><code>Protected Sub gridTabla_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles gridTabla.RowDataBound
  e.Row.CssClass = "clickableTr"
End Sub
</code></pre>

<p>And my jQuery function</p>

<pre><code>$('.clickableTr').click(function () {
  $(this).toggleClass('activeTr');
});
</code></pre>

<p>Im not sure what im doing wrong, this works perfectly on outer-table elements</p>