views:

1522

answers:

3

I am binding an event to a checkbox's change or click event which works fine in Firefox but in IE I have to click anywhere else (causing the blur) event before the event is fired.

I have read and believe this is down to the way IE fires the events, but is there anyway I can get round it?!

The whole point is that it is a smooth search feature which doesnt need a search button to be clicked

$('#sidebar .itemSearchModule-Form input[type=checkbox]').click(function() {
    $('#sidebar .itemSearchModule-Form .saveButton').click();
});
+1  A: 

The change event requires a blur to happen first. The Click event should not. You could always force a blur event if you wanted by $(elem).blur()

Alex Sexton
A: 

try giving that checkbox a class like chkbx and try:

$('.chkbx').click(function() { etc...

its just for debuggin your selector.. being sure problem is in the action. i think for IE you need to use GetElementByID.

Noam Smadja
A: 

Paolo Bergantino was write so this answer credit should go to him.

Seems my code was all screwed up and another selector was getting tied up with the sample I used above.

The CLICK event does work in IE I an confirm, if you are suffering the same problem ALL I can suggest is you check your code

tigermain