I have a dynamically appended menu which I am removing if you click anywhere on page including the menu links itself. What I am trying to achieve is to prevent the remove if yo
Maybe it will work like this
$('html').click(function(e) { if(!$(e.target).hasClass('solid') ) { $('.menu').remove(); } });
see: http://jsfiddle.net/fq86U/2/