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