This is the selector I am trying to use in order to return the data below it.
$('.groupPopper').click(function(event){
var name = $(this).index(".name").contents();
alert(name);
});
<a class="groupPopper">
[text class="name">Name here</a>
</a>
How do I return the text element by it’s class, by clicking element ‘a’ in jquery? My example won’t work..
Assuming what you’ve posted under your jQuery is supposed to be HTML, this should work: