Jquery user control
<p>I have a problem with jquery not loaded in an asp user control.</p>

<p>I want simply to add the click event when a checkbox is clicked.</p>

<p>Here is my javascript file </p>

<pre><code>$(document).ready(function() {
    var arr = jQuery(":checkbox[id*='drpAccountType']");
    for (i = 0; i &lt; arr.length; i += 1) {
        $("#" + arr[i].id).click(function() { alert(this.id) });
    }
});
if (typeof (Sys) !== 'undefined') Sys.Application.notifyScriptLoaded();
</code></pre>

<p>The user control pre render events:</p>

<pre><code>Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
        ScriptManager.RegisterClientScriptInclude(Me, Me.GetType, "CheckboxdropdownScript", ResolveUrl("~/Scripts/CheckBoxDropDown.js"))
End Sub
</code></pre>

<p>the script is loaded fine but any usage of jQuery return undefined. Then only when the page is loaded I can excute the same code for the commande line in firebug. The jquery library is  loaded in the master page.</p>

<p>Whenever I'm using jquery within an asp user control I always find problems, and I always have to hack around to get it to work. I try all the entries in stackoverflow but I never found a one as general solution.</p>

<p>did any one found a simple solution to use jquery with master pages, user control in asp.net
I would appreciate  if someone can share such valuable information.</p>

<p>My manager is about to drop jquery from the application as we always waist lot of time just to find a workaround to have it to work with user controls.</p>

<p>Please help, I like jquery and I really want to use it for client script.</p>

<p>best regards</p>
