Есть вот такой код
jQuery(function($) {
var inst = $('[data-remodal-id=modal]').remodal();
$('#modal').click(function(e) {
e.preventDefault();
inst.open();
});
if ($('#sendautor').length) {
inst.open();
}
});
Он вызывает модальное окно.
Как мне его встроить вместо alert. alert срабатывает вот так:
if(res.z< min || res.v> max) {
alert('Incorrectly');
return false;
}
То есть чтобы вместо alert('Incorrectly');
выполнилась вот эта функция:
jQuery(function($) {
var inst = $('[data-remodal-id=modal]').remodal();
$('#modal').click(function(e) {
e.preventDefault();
inst.open();
});
if ($('#sendautor').length) {
inst.open();
}
});
Вроде бы вопрос понятен...