Triggering event in a Form/Javascript
Sometimes the values you put in the form through any kind of way except user interaction are not triggering change event upon which some other parts of the form behave. In order to forcefully trigger the even, you can use jQuery.
jQuery('YOUR_SELECTOR').trigger('change');
or simply
$('YOUR_SELECTOR').trigger('change');
My Advice. ALWAYS use jQuery rather than any custom made functions, since jQuery is guaranteed to be web browser compatible! And it is cool and easy!
jQuery('YOUR_SELECTOR').trigger('change');
or simply
$('YOUR_SELECTOR').trigger('change');
My Advice. ALWAYS use jQuery rather than any custom made functions, since jQuery is guaranteed to be web browser compatible! And it is cool and easy!
Comments
More convenient way is maybe doing the following. jQuery('*').trigger('event'); (only once)