I have a dropdown that triggers an ajax call when its changed:
$(\'.travel-to\').change(function(){
$.ajax({
type: \"GET\",
url: \"/inc
Maybe instead of using the change() event use the blur() event and check to see if the value changed?
FYI, i have not tested this, just an idea that I had. and I am not sure if this is the desired effect because it would trigger on a lost of focus, but I am suggesting it as to keep the effect consistent across different browsers.
var currentValue;
$('.travel-to').blur(function(){
var val = $(this).val();
if (currentValue != val) {
currentValue = val;
$.ajax({
type: "GET",
url: "/inc/rates/rates-viewer.php",
data: "shtech=y&c_name="+escape(currentValue),
success: function(html){
$(".rates-viewer").html(html);
$(".rates-viewer tr.numbers td").css({ opacity: 0 }).fadeTo("slow",1);
}
});
}
});