events - jquery click handler fires multipli times -


I'm having trouble that my saveBTn event fire property clicks on time because the function given below is for each time A new click handler is called a user function call. How do I register only one click event handler? Function force annotation (no annotation, object no, no client, call back) {$ ('# forced annotation') Dialog ({modal: true, width: 385, height: 370, close opencache: false, open: function (event, UI) {jQuery ('.ui-dialog-titlebar-close'). Hide ();}}) ; $ ('# CancelBtn') Click (function () {callBack.onCancel (); $ ('# forced annotation'). Dialog ("off")}); $ ('# SaveBtn') Click (function () {// call AJAX}}; }

Perhaps you can use the jQuery.one () function.

"Attach a handler to an event for elements. The handler is executed once per element."



Comments