Why this script is not getting the H3 inside each iteration, but all the H3 of the all iterations each time?!
JS:
$('a.grid-box').each(function(index){
$( '.meta-info h3');
});
HTML:
<div class="row">
<a class="grid-box" href="">
<div class="links-icons meta-info">
<h3>Title 1</h3>
</div>
</a>
<a class="grid-box" href="">
<div class="links-icons meta-info">
<h3>Title 2</h3>
</div>
</a>
etc...
</div>
Because your selector is making no reference to the
a.grid-box
iteration context, and so is searching globally.Change
to
Also note the
;.
typo in your original code.