views:

179

answers:

1

I'm having some trouble with jQuery and IE. I've narrowed it down to this:

 jQuery("#missionDashboardRoleFilter").live("change", function(){
    alert("called");
});

<select id="missionDashboardRoleFilter">
...

This is working fine in Firefox, Chrome, Opera... but (obviously) not in IE6.

I'm not sure what to do... any idea?

+4  A: 

On jQuery's live event page (http://docs.jquery.com/Events/live), it is said:

Currently not supported: blur, focus, mouseenter, mouseleave, change, submit

Guillaume Flandre
Instead of using 'click' you could just bind the actual change event. If the element doesn't exist on page load, just make sure you bind it after its addition to the page.
Alex Sexton
click is different than change, I guess I'll have to add it manually :'(
marcgg
you could compare the value before and after the click; But you're right that certainly wouldn't work if one is using their keyboard.
Guillaume Flandre