function sendAjaxForm(parent) { var el = $(parent); $.ajax({ type: "POST", url: el.attr('action'), data: el.serialize(), // serializes the form's elements. success: function(data) { $('.back_call_popup').removeClass('show'); alert('Спасибо, мы свяжемся с Вами в ближайшее время!'); if ($.colorbox) $.colorbox.close(); } }); ga('send', 'event', 'Callback', 'callback', ''); }