jquery checkbox to set input type
<p>I have a html page which requires two passwords, if these do not match a div appears to say so. Within the div a checkbox is also shown when the user checks this it should change the password type to text and vice versa. I seem to be having problems detecting if the checkbox is detected or not.</p>

<pre><code>$("#password_error").html('Passwords do not match &lt;br /&gt; &lt;span class="password_error"&gt;&lt;input type="checkbox" id="password_text" /&gt; Show Characters&lt;/span&gt;');
  $("#password_error").show("slow");
  checkbox_status();

function checkbox_status()
{
 if ($('#password_text').is(':checked'))
 {
  $('input:password[type="text"]');
 }
}
</code></pre>

<p>The ID on the input box for password is "password".</p>

<p>Any advice? Thanks</p>
