I am trying to select only the topmost section H1s. In this fiddle, I am only trying to select the h1 HTML of ba, ss, we, a, and tt. However, given my current trials to select them, I am somehow grabbing the lower level H1s of the “we” section. My only guess is that the “we” section has class declarations for child sections, whereas the other sections do not. So how would I only select these 5 H1s using JQuery.
Here are my attempts thus far (also in the JS panel of the fiddle):
$('.block section:parent h1')
$('.gc section >h1:first')
$('.block.gc section >h1')
$('.gc section >h1:first')
$('.block.gc section >h1')
$('.block.gc section >h1:first')
$('.gc section >h1:first-child')
Like so? http://jsfiddle.net/RAzkq/6/
Here’s the selector: