This is driving me crazy. I’m trying to apply a listener to a div so that when it is clicked it shows a custom drag-down menu (another div). This is how I am trying to get this done in JQuery:
$('#fakeFont').click(function(){
$('#fontSelect').removeClass('hidden');
$('html').one('click', function(){
$('#fontselect').addClass('hidden');
});
});
The problem is that the listener I’m applying to the html is recognizing the first click. Thanks in advance to anybody knows how to remedy this.
Try stopping propagation: