JSFiddle - React, Tailwind, and code Playground

by mohammadAdil

HTML

<tr>
    <td>4.</td>
    <td>here is text</td>
    <td>
        <div class="adp-distance">0.7 mi</div>
    </td>
</tr>

JavaScript

$("tr").each(function (index) {
    var excludeDistance = $(this).clone().find('div.adp-distance').remove().end().text();
    console.log(excludeDistance);
});