Can a click handler be used multiple times?
I have an img which I use as a button to initiate an ajax interaction with the server. I have attached the following click handler to it:
var current_editor = new Editor("maintext", "main", "index");
$(function() {
$("#edit_button").click( function(event) {
current_editor.open();
});
});
This works exactly as I expect it to ... once!
How do I set this up so that the user can click on this button a second time and open the editor?
I run this on FireFox with Firebug active. My code runs without error, I get no feedback of any kind. It simple does not do anything the second time. I have tried to reset the click handler as part of my code when I close the editor. That is, I open the editor (which works) and as I close it I try to reset the click handler. I have tried with and without this reset code in place (as well as several version of it) but I have not found any way to get the button to respond a second time.
Any hel understanding this issue would be appreciated.
-- Will Merrell