Delegate Control with jQuery Not Working

Mar 3, 2009 at 8:18 AM
I have created a UserControl
<%@ Control Language="C#" ClassName="jQueryUC" %>
<script type="text/javascript" src="~/_layouts/jquery-1.2.6.js"></

i created a Feature.xml and elements.xml
in elements.xml i used the "AdditionalPageHead" as controlId and Sequence=90 and path of controlsrc.

i install and activate this feature

<SharePoint:DelegateControl ID="DelegateControl1" runat="server" ControlId="AdditionalPageHead"
AllowMultipleControls="true" />
i wrote this tag in Head Tag of my masterPage (Note: this is not default.master , it my custom masterpage)

now i added an Test.aspx page
in this page i have all ContentPlaceholders that we needed
<asp:Content ID="Content11" ContentPlaceHolderID="PlaceHolderMain" runat="server">
<script type="text/javascript">
$(function() {
$('#anc').click(function() {
alert("Hello World");
<a href="#" id="anc">Request</a>


i run my Test.aspx page, it got my custom masterpage, i check the viewsource of Test.aspx , in head Tag i found this (<script type="text/javascript" src="~/_layouts/jquery-1.2.6.js"></script>)
but my jQuery doesn't work.
i am just showing simple alert.

where i am doing wrong.

any Ideas?
Kind Regards,
Mar 3, 2009 at 10:15 AM
it works....

i have used the wrong path ....