How can I detect in jQuery when any option in the select tag has been changed?
For example, [pseudo-code]:
event handler function -> option changed(){ //do some stuff }
EDIT:
I have the following choice:
<select id = "selectattribute"> <OPTION VALUE="0">Choose Attribute</OPTION> <?php echo($options);?> </select>
I try this in jQuery:
$(document).ready(function() { $("#selectattribute").change(function() { alert('Handler for .change() called.'); }); });
Nothing happens ... function isn; t triggering.
EDIT: it works when I use $("#select") instead of $("#selectattribute")...can you not apply it to particular select tags?
user906568
source share