I want to hide a div when they click out of it. For that I have this code that works perfectly:
var box3=$(".despcnt");
box3.mouseup(function () {
return false;
});
$(this).mouseup(function (a) {
if(!($(a.target).parent(".despcnt").length>0)){
box3.removeClass("dino");box3.hide()
}
});
But I want to exclude from the class. Despcnt a link that has the class desplcnt so when clicking outside the den or closes that same link ... not tried putting it did not work.
Any idea?
HTML
Link
No comments:
Post a Comment