Same click function for numerous links
I have links on my page that get their attributes via PHP from MySQL.
<a href='#' class='link_click' id='<?php echo $myid; ?>' >My_Link_1</a><br>
<a href='#' class='link_click' id='<?php echo $myid; ?>' >My_Link_2</a><br>
<div id='my_container'> </div>
The '$myid' php variable will be different every time. I then pass the id (via .load() POST) to another PHP script and load that page in my_container. Here is the jquery syntax:
$(document).ready(function(){
$('.link_click').click(function(){
$("#my_container").load("classes/class.file.php", {proj: $(this).attr('id')} );
return false;
});
});
When I initial click on the first link, this works perfectly! However, I can not click on any links after that. The status bar just says 'done' and firebug doesn't report anything. How can I reuse my click function to load reload the page in the same container when a user hits the second link after the first?
Thank You
-cs