[jQuery] JQuery and asp.net UpdatePanel

[jQuery] JQuery and asp.net UpdatePanel


This is probably a trivial question but I am a JQuery newbie. I'm
having difficulties running the following script when embedded
in an update panel control: Firebug informs me that $ is not defined.
What is wrong with this piece of code? The script works fine on a
regular aspx page (ie. no update panel). It works also as is if the
jquery
statement is commented out. I tried substituting the $ prompt with
another prompt to no avail.TIA for any hints.
<asp:Content ID="Content4" ContentPlaceHolderID="CPM2" Runat="Server">
<asp:UpdatePanel ID="UpdatePanel1" runat="server" >
<ContentTemplate>
<script type="text/javascript" language="javascript">
Sys.Application.add_load(WireEvents); // wait for sync or
asyinc post-back trigger.
function WireEvents() {
$("#div2").click(function() { alert('Div2
clicked!'); }); // Firebug warns that $ not defined
alert('hello'); // works ok if JQuery function call
is commented out
}
</script>
<div id="div2" style="padding:5px 0px;">Click div2</div>
<asp:Label ID="Label" runat="server"><%=Date.Now.ToString()%></
asp:Label>
<asp:Button ID="butPanel1" runat="server" Text="Panel 1" /