Not defining function directly in Event listener
<p>This is a simple listener:</p>

<pre><code>$("#target").keypress(function(event) {
  alert("test");
});
</code></pre>

<p>I want to take separate function out but it won't work:</p>

<pre><code>$("#target").keypress(doAlert(event));

function doAlert(event)
{
  alert("test");
}
</code></pre>

<p>What am I missing?</p>
