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
$('html').click(function(e) {
/* exept elements with class someClass */
if($(e.target).hasClass('someClass')){
e.preventDefault();
return;
}
/* but be carefull the contained links! to be clickable */
if($(e.target).is('a')){
return;
}
/* here you can code what to do when click on html */
});