Text and Animation

This fiddle demonstrates how to change the text of a element paired with running a jQuery .animate function.

by Thomas Ellsworth

HTML

<font id="test" size="7">This Text!</font>
<button>Click Me!</button>

CSS

#test {
    position: relative;
}

button {
    display: block;
}

JavaScript

$('button').click(function() {
    $("#test").html('The text has now changed!');
    $("#test").animate({left: '100px', top: '100px'},500);
});