Hi my requirement is show loading spinner and page get disable and non clickable when ajax request is send for this I have included given code
$('#expressShippingCalculation input').change ->
if $('#shipping_method4').is(':checked')
additionalAmountExpress()
data = $('#shippingDetails').serialize()
expressValue = true
else
$('#additional-charge').hide()
expressValue = false
$.ajax
url: '/update_express_shipping?expressShipping=' +expressValue
type: 'PATCH'
return
$(document).ajaxStart ->
$('#spinner').show()
return
$(document).ajaxComplete ->
$('#spinner').hide()
return
$(document).ajaxError ->
$('#spinner').hide()
return
with the above code snippet ajax loader is working but my page does not get disable when spinner is loading. Please guide me how to disable page when ajax is loading.