Using Javascript to hide words in a string
<p>I have a sentence which I would like to be able to hide words by using Javascript. For example, hiding the first and 6th word or something. Coming from a PHP background my guess is that it would go something like this.</p>

<ol>
<li>You have a DIV with a sentence in it. </li>
<li>You get the value of the DIV (the text sentence).</li>
<li>You split the text by spaces " " to get each word.</li>
<li>You then surround each word with a SPAN and id or class.</li>
<li>You place all the words with the spans around them back into the DIV.</li>
<li>Then from user interaction (or timeout events) you can hide each SPAN[text]SPAN as needed.</li>
</ol>

<p>Is this the proper way to handle this?</p>
