I am having a simple div structure ( see below ). All I am trying to do is when the div id \"interviewer-Button\" is clicked the following div\'s should appear and when the
You can also take advantage of event propagation and attach just one event:
$(function() { $("#parent0").hide(); $("#interviewer-Button").on('click', function(e){ $(this).find('#parent0').toggle(e.target.id !== 'elt'); }); });