Try this instead
<div id="panel"></div> <br> <input type="button" value="Font+" name="fontAdd" id="fontAdd">
I added id="fontAdd" and then link to click()
$('#fontAdd').click(function(){ size2++; size=size2+"px"; if(typeof size2=="undefined"){size2="10";}; $('#panel').html("<form method='post' name='pad' align='center'><textarea class='look' rows='11' id='code1' style='font-size:"+size+";' name='text' cols='58'></textarea><br></form>"); });
In addition, you are missing a few ;
Example: http://jsfiddle.net/jasongennaro/n3jGK/
** Press the font + button to see the increase.
source share