Use jQuery to hide a DIV when the user clicks outside of it
I am using this code: $(‘body’).click(function() { $(‘.form_wrapper’).hide(); }); $(‘.form_wrapper’).click(function(event){ event.stopPropagation(); }); And this HTML: <div class=”form_wrapper”> <a class=”agree” href=”https://stackoverflow.com/questions/1403615/javascript:;”>I Agree</a> <a class=”disagree” … Read more