I've got this html
<div>This text is <strong>really</strong> awesome!</div>
I want to wrap inside <span>
clicked part of text. So if you click on This text is part you should get
<div><span>This text is </span><strong>really</strong> awesome!</div>
And same with any atomic part of the div
I'm trying to make $('div').click();
event but I can't find out how to detect only the clicked part if it is not wrapped inside something (it's ok with <strong>really</strong>
part but not with part before and after it)