JSFiddle - React, Tailwind, and code Playground

HTML

<div id="yourDiv" style="Display: none;">your Text Here</div>
<div id="yourActualDiv"></div>

JavaScript

var wordArray = $('#yourDiv').html().split(' ');
var totalString = "";
for(var i=0;i<wordArray.length;i++)
    totalString += "<span>" + wordArray[i] + " </span>";
$('#yourActualDiv').html(totalString);
$('#yourActualDiv span').mouseover(
    function()
    {
       alert($(this).html());
    }
)