I seem to run into this problem all the time while working with jQuery. When two form fields A and B have change event handlers that modify the other (A modifies B and B modifies A), what is the accepted design pattern for preventing them from creating a circular loop?
Share
If you’re triggering the partner element’s “change” handler explicitly from each handler, just set a flag on the source element and abort the handler if you see that flag.