How to find parent's tag name
How to find parent's tag name
I want to check if the image wrapped by a tag, so I write the code like
$('img').each(function() {
console.log($(this).parent().tagName);
});
but it seems not work, how to do it?
Topic Participants
chan15tw
sourrisseau1
gregory.denturck