I have the following html format,
<tr>
<td width="80%" style="padding-bottom: 3px" class="ms-vb">
<span class="ms-announcementtitle">
title is here 3
</span>
<br>
by Ahmed 1
</td>
</tr>
<tr>
<td width="80%" style="padding-bottom: 3px" class="ms-vb">
<span class="ms-announcementtitle">
title is here 2
</span>
<br>
by Ahmed 2
</td>
</tr>
<tr>
<td width="80%" style="padding-bottom: 3px" class="ms-vb">
<span class="ms-announcementtitle">
title is here 3
</span>
<br>
by Ahmed 3
</td>
</tr>
how to use jQuery to get the text after <br>
i.e. by Ahmed 1, by Ahmed 2, by Ahmed 3
var text = [];
$('.ms-vb').each(function() {
text.push($(this).html().split('<br>')[1]);
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With