Effect.tagifyText
Effect.tagifyText transforms any text string contained in a specific element into a chain of span
elements, each containing one character of the string.
Syntax
Effect.tagifyText(element);
Demo
which is contained in the following
div
.
Go! Click on the button! Tagify me!
Source code of this demo
<style type="text/css">
div#tagify_demo { padding:10px 0; }
button#tagify_button { padding:3px; }
div#tagify_element { border:1px solid #3071cc; padding:10px; margin-top:10px;}
div#tagify_element span { border:1px solid #df7418; padding:5px; }
</style>
<div class="demo" id="tagify_demo">
<button id="tagify_button" onclick="Effect.tagifyText('tagify_element'); return false;">Tagify the text</button> which is contained in the following <code>div</code>.
<div id="tagify_element">Go! Click on the button! Tagify me!</div>
</div>