jquery with check box in asp.net problem
<p>I'm trying change an input mask for textbox when the the check box has been check or unckecked but the problem that always is picking up the else condation only even the check box it is check or not.</p>

<p>please advice to fix this problem.</p>

<p>here is my code:</p>

<pre><code>&lt;%@ Page Title="" Language="C#" MasterPageFile="~/Imam.Master" AutoEventWireup="true" 
CodeBehind="WebForm4.aspx.cs" Inherits="Imam_Contacts.WebForm4" %&gt;
&lt;asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"&gt;

&lt;script src="js/jquery-1.4.1.js" type="text/javascript"&gt;&lt;/script&gt;


&lt;script src="js/jquery.maskedinput-1.2.2.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;



  if ($('#chkhtml:checked').size() &gt; 0)
{
jQuery(function($) {

       $("#txthtml").mask("999-99-9999");
   });
 } else { 
 jQuery(function($) {

       $("#txthtml").mask("99/99/9999");
   });
 }  

&lt;/script&gt;


 &lt;/asp:Content&gt;
 &lt;asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"&gt;
 &lt;input id="chkhtml" type="checkbox" checked="checked" /&gt;

 &lt;/asp:Content&gt;
</code></pre>
