"click" event handler not firing
<p>I have a php page that prints out a div having multiple anchor tags with different IDs. Here is a sample code:</p>

<pre><code>echo "&lt;div id=\"pageLinks\"&gt;";
echo " &lt;a href=\"javascript:;\" id=\"1\"&gt;&lt;&lt;&lt;/a&gt; ";
echo "another link...."
echo "&lt;/div"&gt;;
</code></pre>

<p>The javascript code that should listen for the <code>click</code> event is the following:</p>

<pre><code>$(document).ready(function(){
    $("div#pageLinks a").click(function(){
       alert("clicked");
    });
});
</code></pre>

<p>but it's apparently not working (I cannot see the "clicked" alert).
Can someone help me?</p>
