jQuery Function Question
<p>I have a question concerning functions with jQuery. I have a function that once the browser is ready the function finds a specific table and then adds hover &amp; click functionality to it. </p>

<p>I am trying to call this function from code behind in an asp .net page due to the fact that once someone adds to the database the update panel fires and retrieves a gridview (the table that has been affected by the function at document.ready). When it comes back it is the plain table again. </p>

<p>Here is the original functions:</p>

<pre><code>$("#GridView1").find("tr").click(function(e) {
                var row = jQuery(this)
                //var bID = row.children("td:eq(0)").text();
                $('#tbHiddenBatchID').val(row.children("td:eq(0)").text());
                //Took out repetitive code, places values from table into modal




                e.preventDefault();
                $('#modalContentTest').modal({ position: ["25%", "5%"] });
                //row.addClass('highlight');
                //$('#tbEdit').val(bID);
            });

//here is the function that adds hover styling
$("#GridView1").find("tr").click(function() {
            return $('td', this).length &amp;&amp; !$('table', this).length
        }).css({ background: "ffffff" }).hover(
            function() { $(this).css({ background: "#C1DAD7" }); },
            function() {
                $(this).css({ background: "#ffffff" });

            });
</code></pre>

<p>OK, what I tried to do is create a function, call it on document.ready and also in the code behind when after the database has been updated.</p>

<p>Here's what I did:</p>

<pre><code>function helpGrid() {
            $("#GridView1").find("tr").click(function(e) {
                var row = jQuery(this)
                //var bID = row.children("td:eq(0)").text();
                $('#tbHiddenBatchID').val(row.children("td:eq(0)").text());
                //
                e.preventDefault();
                $('#modalContentTest').modal({ position: ["25%", "5%"] });
                //row.addClass('highlight');
                //$('#tbEdit').val(bID);
            });

//Haven't even tried to add the hover stlying part yet; can't get this to work.
        }
</code></pre>

<p>When I try to call helpGrid(); I get an error that's it not defined...</p>

<p>Obviously I'm a jQuery newb but I do have jQuery in Action &amp; I'm scouring it now looking for an answer...</p>

<p>Please help..</p>

<p>Thanks!!!</p>
