Error with my JQuery code in IE but not Firefox

Posted by Kaz Lee on Stack Overflow See other posts from Stack Overflow or by Kaz Lee
Published on 2010-06-08T22:58:32Z Indexed on 2010/06/08 23:02 UTC
Read the original article Hit count: 178

Filed under:
|
|

Guys,

I have this code below which works in firefox and all others except in IE. Am I making a syntaxt error somewhere? Can't seem to find it and its driving me nuts. Any help is appreciated!

<script>

  $(document).ready(function(){
     $("label:contains('Number')").html("Register:");
     $("input[type='textbox']").each(function(){
         var name = $(this).attr('name'); // grab name of original
         /* create new visible input */
         var html = '<input type="checkbox" class="NetscapeFix" size="4" maxlength="5"  name="'+name+'" id="'+name+'"  value="1" dir="rtl" />';
         $(this).after(html).remove(); // add new, then remove original input
      });
  });

  </script>

Thank you, Kaz

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about firefox