We are often faced with a reason to style text on-the-fly using client-side code. MooTools makes that quite elementary with concepts found prominent in this very recipe!
It is possible to set the styles of any text element quickly and easily.
<script type="text/javascript" src="mootools-1.3.0.js"></script> </head> <body> <form action="" method="get"> <input id="go_bold" type="button" value="Bold Oscar"/> <input id="go_div" type="button" value="Set Oscar Apart"/> </form> <br/> <div>Every great man nowadays has his disciples, and it is always Judas who writes the biography. <span id="quote_author">Oscar Wilde</span></div> <script type="text/javascript"> $('go_bold').addEvent('click', function() { // set a style property of an element $('quote_author').setStyle('font-weight','bold'...