$(document).ready(function(){
simpleCart({ /*options for simpleCart */ });
$('#order').ajaxForm({
beforeSubmit: function(arr,$form, options){
if ( !validateEmail( $('#email').attr('value') ) ) {
alert('Only valid email address is allowed to be entered into the "email" field');
return false;
} else {
return null ;
}
},
success: function(data){
simpleCart.each(function( item , x ){
item.remove();
});
$('#descr').html(data);
}
});
function validateEmail(email) {
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email))
{
return true;
}
return false;
}
});
Выдаёт ошибку "Type error: 'undefined' is not a function (evaluating'$('#order').ajaxForm')"