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.
我在#anotherdiv 中有链接
但是根据设计 #anotherdiv 在取消选择 #thediv 时会隐藏。
当我单击链接时,如何在隐藏父 div 之前触发它?
谢谢!
$('#thediv').livequery("blur", function(e){ $('#anotherdiv').hide(); });
您可能会尝试延迟hide()一点:
hide()
$('#thediv').livequery("blur", function(e){ setTimeout(function() { $('#anotherdiv').hide() }, 50); });