$(".step1 input, .step1 textarea").keyup(function() { if($(this).val()!="" && $(this).prop('required') && $(this).is(":visible")) { $(this).parent().next("div").hide(); $(this).removeClass('missing'); } }); $("#submitit").click(function(event) { $('.step1 input, .step1 textarea').each(function() { $(this).parent().next("div").hide(); $(this).removeClass('missing'); }); musthave=true; $('.step1 input, .step1 textarea').each(function() { if($(this).val() == "" && $(this).prop('required')) { $(this).addClass("missing"); $(this).parent().next("div").show(); musthave=false; } }); var filter = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i if(filter.test($("#email").val()) && musthave) { var datastring = $("#contactform").serialize(); var mailingdata = "mailingtodo=contact_us&"+datastring; $.post('/php/mailing.php', mailingdata, function() { }); var mailingdata = "mailingtodo=contact_feedback&"+datastring; $.post('/php/mailing.php', mailingdata, function() { }); notify("Megkaptuk a megkeresésedet. Mindent megteszük, hogy a lehető leghamarabb segítségedre lehessünk.","zold"); $("#email").val(""); $("#subject").val(""); $("#description").val(""); $("#eventlink").val(""); } else { $(".email").addClass("missing"); $(".email .feedback").show(); musthave=false; } return false; }); //# sourceURL=contact.js