Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在页面加载后 3 秒后模糊当前窗口。如何使用 jQuery 使当前窗口模糊?
我没有检测到模糊事件。
====更新===
我试过了:
$(window).blur(); $(document).blur();
失败的
我的意思是取消关注浏览器的当前窗口/页面。
检查这个
var xSeconds = 2; // 2 seconds var myDialog = $('dialog_element').dialog('open'); setTimeout(function() { myDialog.dialog('close'); }, xSeconds * 1000);