Best Answer Mirotvoretz , 26 October 2015 - 13:46
Поспешил задать вопрос. Разобрался самостоятельно. Нашел немного другой код скрипта.
<div id="form"> тут вставка формы через модуль или плагин </div>
<script>
jQuery(document).ready(function() {
jQuery('#form form').submit(function() {
var data = jQuery(this).serialize();
jQuery.post(jQuery(this).attr("action"),data,function(data,status){
if(status=='success'){
if(jQuery(data).find("#form").find("form").html() == undefined)
{
jQuery("#form").html(jQuery(data).find("#form").html());
}
}
});
return false;
});
});
</script>
Всё работает. Вопрос закрыт. Может кому-то пригодится.
Go to the full post


This topic is locked









