Links I Insert Dynamically Don't Work.

Links I Insert Dynamically Don't Work.

It's a little tricky for me to explain this because there's a lot of dynamic code involved. Here's my jQ code to start:

// Closed Yes
$("#closed_yes").click(function() { $("#tag_options_box").load("../../user/tag_options_insert.php?action=yes&id="+rid,function() { }); }); // Closed No $("#closed_no").click(function() { $("#tag_options_box").load("../../user/tag_options_insert.php?action=no&id="+rid,function() { }); }); // Closed Tag $("#closed_tag").click(function() { $("#tag_options_box").load("../../user/tag_options_insert.php?id="+rid,function() { }); });
So my page starts with one link of the ID closed_tag. <a id='closed_tag'>
That link lives in a div, and when you click on that link, a new php page is loaded into that DIV instead. So what you clicked on gets replaced with a new little blurb containing two more links,  <a id='closed_yes'> and  <a id='closed_no'>

So the first click works, so the 'yes' and 'no buttons show up on the page. But those buttons then don't work. Nothing in the javascript console. Simply nothing happens when you click on them.

My best guess is that, because the links didn't exist when my jQ code was initially loaded, they don't work once you just stick them in. But I don't know how to remedy this at all. Also I don't want to have them be there the whole time, hidden, because they contain dynamic content from the PHP page.