Hi Guys i have this in html
<div class="flexmls_connect__sr_address">
<div class="flexmls_connect__ld_price">$9,000,000</div>
Km. 16.5 Carr. Barra de Navidad, Villa Armonia Estate
<br>
Puerto Vallarta, JA
<br>MLS# 11187
<br>//NEED THIS NUMBER---- >5 beds | //AND THIS NUMBER---- >8 baths | 11836 sqft
<br>
</div>
and this in jquery
var baths = $(res).find('.flexmls_connect__sr_address').before('br').last().contents().filter(function() {
return this.nodeType == 3;
}).text();
I need obtain the beds and baths, and for clearify not is my html code i obtain from a very old API and i cant change the HTML, i neee that values with only jquery or javascript. not neccesary with my answer all methos are welcome i only try many of theme and the last is get text before last tag br but any help is great, thanks :D
before()
is a dom insertion method. Can do something like the following