JSFiddle - React, Tailwind, and code Playground
by Blake Plumb
HTML
<div id="test">Here is some text</div>
JavaScript
var oldHtml = $('#test').html(function(index, oldHtml){
//some custom code here
return oldHtml;
});
console.log(oldHtml);
var someOtherHtml = getOldHtml();
console.log(someOtherHtml);
function getOldHtml(){
return $('#test').html();
}