Why can't .click be substituted with an onClick event?
<p>How come this code will work perfectly fine:</p>

<pre><code>&lt;script&gt;
$('.changeStuff').click(
function() {
  $('#number2').val(12.00);
});
&lt;/script&gt;

&lt;body&gt;
&lt;h2 class="changeStuff"&gt;Lets change some stuff&lt;/h2&gt;

&lt;input name="number2" id="number2" value="11.00"&gt; 
&lt;/body&gt;
</code></pre>

<p>While this code, written to be used in an onClick event, wont work at all?</p>

<pre><code>&lt;script&gt;
function change_stuff(b) {
  $('#number2').val(b);
}
&lt;/script&gt;

&lt;body&gt;
&lt;h2 onclick="change_stuff('12.00')"&gt;Lets change some stuff&lt;/h2&gt;

&lt;input name="number2" id="number2" value="11.00"&gt; 
&lt;/body&gt;
</code></pre>
