Submitting the form from the site is implemented using ajax. And from desktops and tablets everything is sent. Only here success only works on deckstop. Why is that?

$("#form-popup").submit(function() { //Change var thp = $(this); $.ajax({ type: 'POST', url: 'mail.php', data: thp.serialize(), success: function() { $.magnificPopup.open({ items: { src: "#thanksModal", type: 'inline' } }); setTimeout(function() { // Done Functions thp.trigger("reset"); $.magnificPopup.close(); }, 2000); } }); return false; }); 
  • one
    because if you consider your two lines to be a rather complete formulation of the question that someone can give a meaningful answer, I can imagine how the code is written - Igor
  • Do not swear. The first time I use the service! - Dmitry Tesalovsky
  • Well, then at the same time I will not find fault with the word "service" :). Maybe it's just that magnificPopup doesn't work on tablets, but not success ? - Igor
  • I do not think, They tried to replace the code with magnifikom with a regular alert also did not work. I think the point is still in Sacks. - Dmitry Tesalovsky
  • add the error handler to the $.ajax parameter and see if it is called - Igor

0