Let's take a quick look at three more features in Spry 1.4. First lets take a look at remove and addClassName. These two functions will either remove, or apply, a CSS style to an element. So consider this element:

<div id="test">This is the test content that will be changing.</div>

To apply a CSS style to this element, you can use this code:

Spry.Utils.addClassName('test','someCSS');

Obviously removeClassName will remove the item.

The last new function I'll discuss is getNodeText(). As you can probably guess, it returns the text inside an element. Using the same div above, the following code:

var str = Spry.Utils.getNodeText($('test'));

will set str equal to: This is the test content that will be changing.

For an example of all three, check out this demo Be sure to view source.