How can I get, using jquery, the id
of the first div with class: post
(367), in the following HTML code:
<div id="own-posts">
<span class="title">Me</span>
<div class="posts_container">
<div class="post"></div>
<div id="367" class="post"></div>
<div id="365" class="post"></div>
<div id="345" class="post"></div>
<div id="343" class="post"></div>
</div>
</div>
Among the solutions I tried:
$('#own-posts').children()[1].children()[1].attr('id');