Ajax filtering option loading spinner – problem on mobile
-
Hi guys, I’ve got quite weird problem. I built product filtering options, sometimes the server is slower so I wanted to add a loading spinner while you wait for the results. I only managed 50% because it works on desktop browsers and, unfortunately, nothing shows on mobile. Anyone have an idea why this can happen?
$('.auto_submit_item').change(function(){ var filter = $('#filter'); jQuery('#m-spinner').addClass('is-active'); $.ajax({ url:filter.attr('action'), data:filter.serialize(), // form data type:filter.attr('method'), // POST beforeSend:function(xhr){ // jQuery('#m-spinner').addClass('is-active'); //option2 }, success:function(data){ // jQuery('#m-spinner').removeClass('is-active'); //option2 $('#response').html(data); } }, function( response ) { jQuery('#m-spinner').removeClass("is-active"); }); return false; });
I tried both options, one which is visible right now, and second one which is in comments. Both options work on desktop but dont work on mobile android and/or iOS.
Any idea how to fix it?The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Ajax filtering option loading spinner – problem on mobile’ is closed to new replies.