One of our engineers just brought an iPad to himself and showed a feature that doesn’t work on our site. This works in Chrome and Firefox, but it does not work on the iPhone or iPad. 3 select the fields that when you click the value in the first, start ajax and fill in the second checkbox.
This is functionality that does not work on iOS.
We are a little puzzled by where to start testing. Can someone give some advice on where to start debugging this, or can you see something that we did wrong?
$().ready(function () {
$('.vehicle-search .make').bind('click', function (e) {
var makeId = $(e.target).val();
var container = $(e.target).parent('.vehicle-search');
if (parseInt(makeId) > 0) {
$.ajax({
url: site.internal.url + '/lib/ajax/vehicle/make/getModelList.php',
type: 'post',
dataType: 'json',
success: function (r) {
if (r.length > 0) {
$('.vehicle-search > .model').html('');
$('.vehicle-search > .year').html('');
var html = '';
for (var i = 0; i < r.length; i++) {
html += "<option value='"+r[i].id+"'>"+r[i].name+"</option>";
}
$('.vehicle-search > .model').html(html);
} else {
alert('We did not find any models for this make');
}
},
error: function () {
alert('Unable to process your request, ajax file not found');
return false;
},
data: {
makeId: makeId
}
});
} else {
$('.vehicle-search > .model').html('');
$('.vehicle-search > .year').html('');
}
});
........
source
share