I just finished and turned in a homework assignment where the goal was to 'dynamically resize text with JavaScript styles'. We had a few paragraphs with a certain class on them, and those were the ones we were supposed to resize.
Now, if you a CSS file that says the text is X size, and then when the page loads you use JavaScript to get that value & make it larger. Would that be considered dynamically changing the size?
What it turns out the teacher actually wanted was to change the text size when the window is resized, but it seems what he actually asked for was pretty open ended.
Just trying to get an idea of what qualifies as dynamic resizing.
Thanks for any insight..
function setGreekSize() // change the height of text w/ 'greek' class
{
var currentSize = parseInt($("#content").css("font-size"))*1.2;
$(".greek").css("font-size", currentSize+"px");
}
I had that in a function for when the document was ready. Somewhat pointless, I know, but he said not to try to get too 'fancy' with the homework assignment.