Resize Font in jQuery Resizable

Made by Adam Schwartz (http://polymath.mit.edu) for a StackOverflow question (http://stackoverflow.com/questions/2092331/how-can-i-resize-font-of-div-by-resizing-the-div-using-jquery).

HTML

<link rel="stylesheet" href="http://polymath.mit.edu/projects/worldTunes/css/custom-theme/jquery-ui-1.7.1.custom.css">
<div id="resizable">
    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</div>

CSS

#resizable {
    height: 100px;
    width: 100px;
    font-size: 10px;
    background: #ccc
}

JavaScript

$('#resizable').resizable({
    maxHeight: parseInt(200),
    maxWidth: parseInt(180),
    resize: function(evt, ui) {        
        var width1 = parseInt(ui.element.css('width')),
            height1 = parseInt(ui.element.css('height'));
        ui.element.css({
            'font-size': (width1/10)+'px',
            'line-height': (height1/10)+'px'
        });
    }
});