Ajax/Get Question - creating objects on the page to load

Ajax/Get Question - creating objects on the page to load

if I am loading content into a div using the get feature of jquery, and that content has some clickable objects in it will jquery recognize those as well? What I am doing is building a site that tracks bugs on our software. The site pulls the bugs from a mysql db and displays in a table format. There's an edit link which passes the record id number of that bug (via ajax) to a php file, where a form is filled in with the bug data and passed back, a hidden div is then shown with the form in it. Part of the code I pass back has a submit button and a close button (css styled anchors) and I'm using the same process on them as I am on the edit link but not getting any results. My script looks like this:

  1. <script src="js/jquery.js"></script>
          
          <script language="javascript">
             $(document).ready(function(){
                
                //hide edit form
                $('#editform').hide();
                
                //toggle bug description
                $("a.clickable").click(function(){
                      if ($('#' + $(this).attr('opendesc') + '_bottom').is(':visible')) {
                       //alert($(this).attr('opendesc'));
                       $('#' + $(this).attr('opendesc') + '_bottom').hide('slow');
                    } else {
                       $('#' + $(this).attr('opendesc') + '_bottom').show('slow');
                    }
                });
                
                //close bug description
                $("a.btnClose").click(function(){
                       //alert($(this).attr('closedesc'));
                       $('#' + $(this).attr('closedesc')).hide('slow');
                });
                
       
                
                //use ajax to load edit bug form
                $("a.edit").click(function(){
                   //get item id
                   var itemid = $(this).attr('itemid');
                    
                    //load edit form data
                   $.get('lib/editform.php', {thisid: itemid}, function(data) {
                        $('#editform').html(data);
                        //alert('Load was performed.');
                     });   
                     
                     //show edit form
                   $('#editform').show('show');
                   
                });
                
                $("a.btnCloseEdit").click(function() {
                   alert("k");   
                });
                               
             });
                
          </script>















































the last click function, where I'm just posting an alert, binds back to this code, which is on the page being loaded in the ajax call:

  1. //other code

    <a href=\"javascript:void(0);\" class=\"submitform\">Submit</a></form><p><a href=\"javascript:void(0);\" class=\"btnCloseEdit\">X</a>

    //other code



I'm a noob with jquery and not sure how it works. Does it sneak peek the page after it loads and get all the objects into some sort of array? I'm thinking it is doing that and because I am adding other object through AJAX it is not seeing those, since the page is not being reloaded. Am I missing something here?

Thanks