Reputation: 21
i cant sellect an object from (This)
<dd class="EachMovie">
<a href="LINK">
<img src="IMAGE" />
<span class="TitulodoPost">TITLE</span>
<br>
<span id="idioma">EXAMPLE</span>
</a>
<div class="cat-STATIC-DATA"></div>
</dd>
I'm using this function
$(".EachMovie").each(function(){
var texto = $(this ".TitulodoPost").height(); // This is whong
var classe = $(this).find("div").css("height","600px"); // This is OK
});
How can select the .TitulodoPost in the loop ??
Upvotes: 0
Views: 52
Reputation: 78690
$(this).closest("dd").find("div");
This assumes that the div is the only div inside the dd
. If you control the html here, I would add a static class to the div to make it easier to target consistently.
Upvotes: 2