There was a problem with the execution of the script after submitting the form, on the desktop version all type-top, but on the mobile version of the element
.after('<h1 class="fancy-success">Π‘ΠΏΠ°ΡΠΈΠ±ΠΎ Π·Π° Π·Π°ΡΠ²ΠΊΡ!</h1> <p class="fancy-success">Ρ Π²Π°ΠΌΠΈ ΡΠ²ΡΠΆΡΡΡΡ Π² Π±Π»ΠΈΠΆΠ°ΠΉΡΠ΅Π΅ Π²ΡΠ΅ΠΌΡ</p>') inserted twice. What could be the snag? Here is the script :
<script> $(function(){ $('#contact').submit(function(){ var errors = false; $(this).find('span').empty(); $(this).find('input, textarea').each(function(){ if( $.trim( $(this).val() ) == '' ) { errors = true; $(this).next().text( 'ΠΠ΅ Π·Π°ΠΏΠΎΠ»Π½Π΅Π½ΠΎ ΠΏΠΎΠ»Π΅ ' + $(this).prev().text() ); } }); if( !errors ){ var data = $('#contact').serialize(); $.ajax({ url: 'index.php', type: 'POST', data: data, beforeSend: function(){ $('#submit').next().text('ΠΡΠΏΡΠ°Π²Π»ΡΡ...'); }, success: function(res){ if( res == 1 ){ // $('#contact').find('input:not(#submit), textarea').val(''); $("#contact").hide('slow').after('<h1 class="fancy-success">Π‘ΠΏΠ°ΡΠΈΠ±ΠΎ Π·Π° Π·Π°ΡΠ²ΠΊΡ!</h1> <p class="fancy-success">Ρ Π²Π°ΠΌΠΈ ΡΠ²ΡΠΆΡΡΡΡ Π² Π±Π»ΠΈΠΆΠ°ΠΉΡΠ΅Π΅ Π²ΡΠ΅ΠΌΡ</p>'); }else{ $('#submit').next().empty(); alert('ΠΡΠΈΠ±ΠΊΠ° ΠΎΡΠΏΡΠ°Π²ΠΊΠΈ'); } }, error: function(){ alert('ΠΡΠΈΠ±ΠΊΠ°!'); } }); } return false; }); }); </script>