Changed

DOM Change, the way it should've worked

The DOM "change" event on input-type elements is fundamentally broken. The justification for this claim comes from its inconsistency across different types input elements. Not only is the criteria for triggering the event different across elements, but the value of the element (upon change) may not even be applicable for form submission (i.e. an unchecked checkbox). Hence, Changed was created to address these issues. Changed is a jQuery plugin that extends jQuery's native event set to expose a brand new "changed" event. This new event provides a normalized interface for change across elements. In addition, it also normalizes the value parameter for qualified form elements.

You can read more about the benefits of using Changed, as well as detailed usage instructions, on the project's official GitHub page. For those looking to see changed in action, you can find an interactive demo below. The demo compares the new "changed" event against plain old DOM change.

Change

Event Log

            
Event Log

            
Event Log

            

Changed

Event Log

            
Event Log

            
Event Log

            

Can't wait to get started? Download the production-ready script here. Found an issue? Please report it on the official bug tracker.

comments