Form reset event doesn't fire in IE

javascript, jquery

Solution

Try attaching the event handler directly to your form:

$(document).ready(function(){
    $("form").bind("reset", function(e) {
        alert("working");
    });
});

This apparently works for multiple browsers including IE8.

Your method may not be working because of how IE8 handles event propagation... From jQuery documentation:

In Internet Explorer 8 and lower, the paste and reset events do not bubble. Such events are not supported for use with delegation, but they can be used when the event handler is directly attached to the element generating the event.

Problem

This function fires in firefox/chrome : ``` $(document).on("reset", "form", function(){ alert("working"); }); ``` What alternatives are out there for IE (I have 8 installed so I'd like to make it work from 8 onwards).

Original source