Struggle with a little problem with jquery. I have this html:
<li class="order">
Order
<strong>$order->id</strong>
</li>
And I want to change "Order" to "Last order" (This html comes from a plugin and if I change it from the plugin directory the changes won't be save in the next update).
So I decided to change it with jquery html()
function. However, if I do
$('.order').html('Last order');
The result is:
<li class="order">
Last order
</li>
But I don't want to remove also $order->id, since it's dynamic content.
My question is if there's a way to exclude it with maybe the strong
tag or something?
Something like
$('.orde:not(strong)').html("Last order");
Thanks in advance!