JSFiddle - React, Tailwind, and code Playground
by Jordan Sayner
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<div id="testDiv">
<div id="content">
</div>
</div>
JavaScript
$.ajax({
url: 'https://widget.datablocks.se/api/rose/widgets/stock-table?token=daa2d38a-bf56-4d73-a4fe-09f83a8cb3d8',
dataType: 'html',
success: function(response) {
var stockPrice = $(response).find('.latest-price');
var returnToday = $(response).find('.delta-today');
$('#testDiv').html(stockPrice.html().replace(/[^\d.-]/g, '').trim());
$('#testDiv').html(returnToday.html().trim());
}
});