当用户在其外部单击时,使用jQuery隐藏DIV
我正在使用此代码:
$('body').click(function() { $('.form_wrapper').hide();});$('.form_wrapper').click(function(event){ event.stopPropagation();});
这个HTML:
<div class="form_wrapper"> <a class="agree" href="javascript:;">I Agree</a> <a class="disagree" href="javascript:;">Disagree</a></div>
问题是我在DIV内部有链接,当它们点击时它们不再有效。
倚天杖
慕姐8265434
www说