I got the answer to the issue. Jquery has a way of handling elements which enter the dom at a later time. They grab the parent element and then delegate the event to the actual triggering element whenever it is created.
I used the below.
$('#parent div').on('click','#event triggering element',function(){
$.ajax({
//ajax function
}
});
return false
});
This solved my headache. Hopefully it will help you as well.