views:

106

answers:

2

This is my javascript function. Its nested in a document.ready fuction()

$(".bim").change(function() {
    var str = "";
    $("input:checked").each(function() {
    str += $(this).next().text() + "_";
        });
    str = str.substr(0, str.length - 1);
    alert(str);
});

It works fine in Firefox and Chrome.

It DOES NOT work with IE8 and IE6

I'm very new to javascript and help would be much appreciated

A: 

Use the jQuery 1.4.2 which fixed several issues with the .change() method for IE

See Related issue Also here on Stackoverflow

adardesign
trying this right now. crossing my fingers
nkuebelbeck
OMG sweetness! so easy i feel silly I was using 1.3.2
nkuebelbeck
A: 

Internet Explorer does not support the :checked pseudo class (and neither does Sizzle IIRC).

Internet Explorer doesn't support :checked:, but as bobince pointed out, it will fall back to Sizzle, which does in fact support :checked.

What version of Internet Explorer are you using?

CD Sanchez
Sizzle does. Normally when a browser's `querySelectorAll()` doesn't support a particular piece of syntax (or the syntax is just wrong, or a non-standard extension), jQuery catches the resulting exception and falls back to using Sizzle instead.
bobince
@bobince: Thank you, I've corrected my post.
CD Sanchez
IE8 and IE6 both did not work
nkuebelbeck