help with datepicker image click

help with datepicker image click

Hello.
 
I am trying to use jquery ui datepicker in a asp.net 4.0 application (vs 2010)
 
The button click doesnt work.  Here is my code.
 
  1. <

    asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">

     

    </

    asp:Content>

    <

    asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">

    <script type="text/javascript">

    $(

    function () {

    $(

    "#txtPartner1Dob").datepicker({

    showOn:

    'button',

    buttonImage:

    'images/calendar.gif',

    buttonImageOnly:

    true

    });

    });

    </script>

    <h2>

    Header 

    </h2>

    <hr /><br />

    <table border="1">

    <tr>

    <td>

    <table border="1">

    <tr>

    <td colspan="2" class="labelcell">Partner 1 Name</td>

    <td colspan="2"> <asp:TextBox ID="txtPartner1Name" runat="server" Width="200"></asp:TextBox></td>

    </tr>

    <tr>

    <td colspan="2">Partner 1 Address</td>

    <td colspan="2"> <asp:TextBox ID="txtPartner1Addr" runat="server" Width="200" /></td>

    </tr>

    <tr>

    <td colspan="2">Partner 1 DOB</td>

    <td colspan="2"><asp:TextBox ID="txtPartner1Dob" runat="server"></asp:TextBox><img src="images/calendar.gif" /></td>

    </tr>

    </table>

  2. Do I have the javascript snippet in the wrong place?