使用智能轮询插件进行jquery轮询
|
我一直在努力使这个插件正常工作,但是我不了解状态功能,因此无法重试。
$.poll(10000, function(retry){
$.get(\'willfail\', function(response, status){
if (status == \'success\') {
// Do something
alert(\"YES\");
} else {
alert(\"NO\");
//retry();
}
})
})
如果我将get请求设置为\'/ \',它会给我警报YES消息,但实际上,尽管有ELSE,也永远不会触发警报No消息。
我正在使用jquery轮询插件:
https://github.com/jeremyw/jquery-smart-poll
有任何想法吗?
没有找到相关结果
已邀请:
2 个回复
磨标烫徽啪
有关更多信息,请参见
。
裸雷胜檀哭