I have a dropdown that triggers an ajax call when its changed:
$('.travel-to').change(function(){
$.ajax({
type: "GET",
url: "/inc/rates/rates-viewer.php",
data: "shtech=y&c_name="+escape($(this).val()),
success: function(html){
$(".rates-viewer").html(html);
$(".rates-viewer tr.numbers td").css({ opacity: 0 }).fadeTo("slow",1);
}
});
});
My problem is, in Firefox, using the up/down cursor keys to cycle through the dropdown options, doesn't trigger the js onChange()
event. It's ok in IE.
How can I make Firefox see the up/down cursors as an onChange
? Can I do an either/or on the event, to make either an onChange
or a keypress trigger the same thing?
Thanks.