I'm trying to disect the price from a string that is returned part as a variable
price_html: "<span class="price"><span class="amount">£2,196.10</span></span>"
Do you know of a jquery function that could disect this?
Thanks in advance.
Make a jQuery object and use class selector to get the span with class amount.
price_html = $('<span class="price"><span class="amount">£2,196.10</span></span>');
price_html.find(".amount").text()
or with single statement
txt = $('<span class="price"><span class="amount">£2,196.10</span></span>')
.find(".amount").text()