Reputation:
I'm trying to select the strong a
tags that's inside the .info class
$(".info").each(function(i, item){
console.log($(this).children("strong a").text())
});
it's selecting the info class correctly, just not the strong a
Upvotes: 8
Views: 17614
Reputation: 6519
Inside a loop, you can also use like this
$(".info").each(function(i, item){
$(this).find("strong a").text();
});
Upvotes: 5
Reputation: 3845
You should be able to do
$(".info").each(function(i, item){
console.log($("strong a", item).text())
});
Upvotes: 17