Reputation: 6351
I have the following html template. I want to get the first person_line
div's content includes the person_line div.
<div class="person_row">
<div class="row-fluid person_line">
<div class="span4">…</div>
<div class="span8">…</div>
<div class="clearfix"></div>
</div>
<div class="row-fluid person_line">
<div class="span4">…</div>
<div class="span8">…</div>
<div class="clearfix"></div>
</div>
</div>
I tried $($('.person_line')[0]).html()
but that does not include the <div class="row-fluid person_line">
. Any ideas ? How can i get the content of person_line as html which includes the upper div.
Upvotes: 1
Views: 467
Reputation: 1628
Try this
$(".person_line").eq(0).html();
more over if you want to get the children of the person_row
childArray = $(".person_row").find(".person_line");
Hope this might help.
Upvotes: 0