Kaz Lee
Kaz Lee

Reputation: 1

Error with my JQuery code in IE but not Firefox

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!

$(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
    });
});

Thank you, Kaz

Upvotes: 0

Views: 63

Answers (1)

Matt Huggins
Matt Huggins

Reputation: 83289

One guess is that there's no such thing as input[type="textbox"]. Perhaps you might have meant to put either input[type="text"] or textarea?

Upvotes: 1

Related Questions