The following works with no problem:
But isn't there a shorter way to achieve the same result? Do we have to repeat the same line for each event?Code:element.oninput = go; element.onchange = go; ...
The following works with no problem:
But isn't there a shorter way to achieve the same result? Do we have to repeat the same line for each event?Code:element.oninput = go; element.onchange = go; ...
In ordinary javascript:
If using recent versions of jQuery (with the newer 'on' function):Code:element.oninput = element.onchange = go;
Code:$(element).on('input change', go);
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Rain Lover (05-14-2014)
Bookmarks