Reputation: 41
All the functions in the following code work fine on desktop browsers, but on iPad and iPhone the top 2 functions work but the 3rd (starting $('input#pagebreakhomeNext').click(function () { ) doesn't work at all.
jQuery.noConflict();
jQuery(document).ready(function($){
$('div.rsform-block-pagebreak input').click(function () {
$(window).scrollTop($('div.calculator').offset().top);
return false;
});
$('a#pagebreaksubmitNext').click(function () {
$(window).scrollTop($('div.calculator').offset().top);
return false;
});
$('input#pagebreakhomeNext').click(function () {
if ($('input#postcode').val() != "") {
var code = $('input#postcode').val();
$.ajax({
url: “URL HIDDEN”,
dataType: "json",
data: 'code='+code,
async: false,
success: function(json) {
if((json.found) && $('input.benefits:checked').val() != "I do not get any of these benefits" && $('input.ownership:checked').val() == "Yes" && $('input.insulation:checked').val() == "Yes" && $('input.walls:checked').val() == "Solid Walls" && $('input.houseage:checked').val() == "Between 1930 and 1976") { $('div.rsform-block-success').hide(); $('div.rsform-block-failure').show(); }
else if((json.found) && $('input.benefits:checked').val() != "I do not get any of these benefits" && $('input.ownership:checked').val() == "Yes" && $('input.insulation:checked').val() == "Yes" && $('input.walls:checked').val() == "Solid Walls" && $('input.houseage:checked').val() == "After 1980") { $('div.rsform-block-success').hide(); $('div.rsform-block-failure').show(); }
else { $('div.rsform-block-success').show(); $('div.rsform-block-failure').hide(); }
}
});
}
});
});
Please can somebody help?!
Upvotes: 1
Views: 1711