Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Close menu on click of Options button and outside of container Reply To: Close menu on click of Options button and outside of container

#240374
Shikkediel
Participant

With the code above, you’re missing some closing brackets…

.mouseup(function(e) {
    e.stopPropagation();
});
});
</script>

I do believe that it should work otherwise. If not, posting the isolated problem on Codepen would be easiest.

Edit – you’d still need the other bit of code as well by the way. This extra listener will just take care of the fact that it will not respond to a click on the options link.