I programmatically build a three-level set of DIVs.
Category A
(Title1)
(Content)
(Title2)
(Content)
Category B
Category C
By default, I set levels 2 and below (titles and content) to display:none. With this code, I show all titles belonging to the category clicked:
$("#catA").on("click", function() {
$("#catA .itemTitle").css("display", "block");
});
...
Now what I want to do is to show the content just for the title clicked. That seems to have exceeded my knowledge of selectors! Any ideas?