What are the benefits and/or pitfalls of calling a function directly from an anchor tag vs creating events onload?
<p>Is there a proper/standard way?</p>

<pre><code>&lt;a href="#" onclick="function();"&gt;Link&lt;/a&gt;
</code></pre>

<p>vs</p>

<pre><code>&lt;script&gt;
$(document).ready(function(){
   $('#link1').click(function(){ ... });
});
&lt;/script&gt;
&lt;a href="#" id="link1"&gt;Link&lt;/a&gt;
</code></pre>
