I have been using a script to redirect my users when submitting a form but is currently causing a browser error ($ post is not a function)
Could anyone help me?
The script:
jQuery(document).ready(function(){
jQuery('#ModalFormContato').submit(function(e){
e.preventDefault();
$.post($("#ModalFormContato").attr("action"), $("#ModalFormContato").serialize(), function(data) {
if(data.erro == "NULL") { window.location.href = "https://www.myurl.com.br/agradecimento"; }
else { window.location.href = "https://www.myurl.com.br/erro"; }
});
});
});
Try by using the non-slim version of jQuery : https://cdnjs.com/libraries/jquery/