I am having this problem when I have a for loop of links and I want each link to alert through jquery but only the first link is working.. What could be the problem?
<link rel='stylesheet' href='CSS/nook.css' type='text/css' media='screen, projection' />
<script type="text/javascript" src="JS/jquery-1.10.2.min.js"></script>
This is my script
<script>
$(document).ready(function() {
$("#click").click(function(e)
{
e.preventDefault();
alert("hi");
});
})
</script>
And this is my loop
<?php
for($i=0;$i<2;$i++){
echo "<a href = '' id = 'click'>a</a><br>";
}
?>