I can have a div called:
closemenu + number like this:
closemenu21
closemenu7778
closemenu9392392392
my problem is, I want to hide all divs with closemenu that are open, so I tried:
$(document).mouseup(function (){
var container = $(".closemenu");
if (!container.is(e.target) && container.has(e.target).length === 0) {
container.hide();
}
});
the problem is .closemenu is not the name of my divs, since it can be .closemenu plus any number.
How can I hide() all .closemenu plus numbers in this function?