$('a').click(function(){
var os = $('p').css('font-size');
var num = parseFloat(os, 10);
var um = os.slice(-2);
$('p').css('font-size', num / 1.4 + um);
if(this.id == 'larger')
{
$('p').css('font-size', num * 1.4 + um);
}
});
------ HTML-----
<a href="#" id ="larger">Larger</a>
<br>
<a href="#" id="smaller">Smaller</a>
<p>
Fits Single/Double Shopping Carts, High Chairs & Infant Swings!
</p>
Friday, January 9, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment