From 833dad6e634d8a7016f6ba8a1bd6e7466916af27 Mon Sep 17 00:00:00 2001 From: Arthur Verschaeve Date: Sat, 3 Jan 2015 14:20:22 +0100 Subject: [PATCH] change: note that JS-initiated change does not trigger change event --- entries/change.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/entries/change.xml b/entries/change.xml index 4884ff1e..16bafc43 100644 --- a/entries/change.xml +++ b/entries/change.xml @@ -52,6 +52,9 @@ $( "#other" ).click(function() {

After this code executes, clicks on Trigger the handler will also alert the message. The message will display twice, because the handler has been bound to the change event on both of the form elements.

As of jQuery 1.4, the change event bubbles in Internet Explorer, behaving consistently with the event in other modern browsers.

+
+

Note: changing the value of an input element using JavaScript, using .val() for example, won't fire the event.

+
Attaches a change event to the select that gets the text for each selected option and writes them in the div. It then triggers the event for the initial text draw.