I'm trying to figure out a way to access a div via jquery to manipulate it. Here is the code:
<div> <!-- Essa é a div que quero acessar -->
<div>
<div>
<div id="conteudo">...</div>
</div>
</div>
</div>
As shown in the comment above, the div I want to access is the one with the highest root shown here. I know these divs around are unnecessary, but sometimes some frameworks and cms put them, and then I find myself in a situation like that, having to access the div I want to move, as it is in the comment.
What I do in jquery to access is as follows:
$("#conteudo").parent().parent().parent().css('padding','15px');
How can I access this div without this whole code? I often do not get these unnecessary divs, so I wanted to access the divs I want in a more effective way (imagine if there were 10 divs there, how many parents I would have to write ...)