1

I am using jquery to locate all the checkboxes in a table column that are checked. For that purpose I am using the following code:

$("input[type=checkbox][checked]").each(function () {
    //Do Stuff
});

This works fine in Firefox 3 but does not work in IE8 or Safari. Can anyone explain why and/or provide a workaround?

EDIT: I'm using jQuery v1.3.2

3 Answers 3

9

try $("input[type=checkbox]:checked").each...

Edit or even sweeter: $("input:checkbox:checked").each...

That works for me in IE8.

Sign up to request clarification or add additional context in comments.

Comments

1

A workaround:

$("input:checked").each(function() {
    //Do Stuff
});

Comments

1

Try this

$("input:checked").click(function () {
    alert('abc');
});

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.