如何使jAlert()像';请稍候';消息(没有OK按钮)


How to make jAlert() like 'Please Wait' message.(without OK Button)

如何制作没有OK按钮的jAlert()消息框。

基本上,我想要的是像Jquery Block UI 一样使用jAlert()

请检查这个小提琴http://jsfiddle.net/Bumts/2/.

核心jquery.alert.js中有一些修改,因为没有覆盖参数。我修改了passoverlay(第6个参数)选项来传递它。你可以用我修改过的代码替换jquery.alertjs代码。

$(function(){
$('#test').click(function(){$('#test3').jAlert('This is a jAlert Warning Box',"warning",'warningboxid', '', '', 1);});
});

使用JQuery事件!!

示例:案例1:如果你试图在一段时间后触发你的按钮然后使用

setInterval( "clickRight()", 5000 );
function clickRight()
{
   $('.slide_right').trigger('click'); 
};

情况2:如果您正在等待用户在输入字段上键入一些内容

$('#form').on('mousedown',function(e)
{
 if(e.which===1)
 {
   //call your function alerting message here//      
 }
}

短代码::

<!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>