My understanding of your issue is that the click event you create does not fire for elements added through ajax. When you attach the handler to the click event of an element, this ONLY occurs for those elements which are currently in the DOM. You have a few options to get the behavior you desire.
1) Use the inefficient "live" handler. (inefficiency measured in milliseconds generally)
$('#stop').live('click', function(){});
2) Reattach the event handler after the element has been inserted into the DOM.
$.ajax({
complete: function(){
$('#idOfTheElementsYouJustInserted').click(function(){});
}
});
3) Attach an event handler to a static parent element, so that when the button is clicked, the event "bubbles" up and triggers this event. To refer to the element that created the bubble, you can use event.target where event is the default parameter passed to the function.
$('#staticParentElement').click(function(event) { var elementClicked = event.target; });