How to make jAlert() Message Box without OK Button.
Basically what I want is to use jAlert() like Jquery Block UI
Please check this fiddle http://jsfiddle.net/Bumts/2/.
There has been some modifications in the core jquery.alert.js, since there has been no overlay param. I made the changes to pass overlay (6th parameter) option to pass for it. You could replace the jquery.alert js code with my modified one.
$(function(){
$('#test').click(function(){$('#test3').jAlert('This is a jAlert Warning Box',"warning",'warningboxid', '', '', 1);});
});
Use JQuery events !!
Example :: Case 1 : If you are trying to trigger your button after an interval then use
setInterval( "clickRight()", 5000 );
function clickRight()
{
$('.slide_right').trigger('click');
};
Case 2 : If you are waiting for user to type some thing on to an input field
$('#form').on('mousedown',function(e)
{
if(e.which===1)
{
//call your function alerting message here//
}
}
Short Code ::
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
</head>
<body>
<input id="whichkey" value="type something">
<div id="log"></div>
<script>
$('#whichkey').on('mousedown',function(e){
alert("Error");
});
</script>
</body>
</html>