I have a html dropdown. I want to fire an event whenever the selection changes in any way. I tried to register the 'click' event, but this did not work on multiple selections (either by dragging the mouse or restraining the shift + down arrow).
So how can I fire an event on any change?
Try using an event onchange.
onchange
$('#mySelect').change(function(){ alert($(this).val()); });
Will .change () do the trick?
http://api.jquery.com/change/
Of course, this page has a working demo of multi-screen selection ...
jquery 1.4: $("#mySelector").change(myChangeEvent); : $("#mySelector").bind("change", myChangeEvent);
$("#mySelector").change(myChangeEvent);
$("#mySelector").bind("change", myChangeEvent);
function myChangeEvent(e){ }