hi friends,
i have a textbox and when i enter 0 in it, it should reset to 1 and display warning message.
i tried with blur() and change(), it is working but the problem is, it is displaying warning on coming out of focus from textbox after entering 0..
what i need is as soon as i enter 0 in textbox the warning msg should come
i have attached code what i tried
$("#textbox1").change(function(){
textboxfunction();
});
function textboxfunction(){
($("#textbox1").val() == 0) ? $("#warning").show() && $("#textbox1").val(1) : $("#warning").hide()
}