点击div之外的地方div消失







click here to show a div.





暂时没有找到纯JQ的方法,只能采用事件处理机制来阻止冒泡。
可以在这里看效果 http://shawphy.com/demo/closediv/closediv.html

===================================
事后发现其实JQ已经为此做了兼容性,具体可以参考http://shawphy.com/40.html

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

This site uses Akismet to reduce spam. Learn how your comment data is processed.