I want a text-input change event to disable edits to other (rather complex)fields in a form until the ok-button has been clicked. I want the user to be able to click the ok-button while still having the text-input focused without having the input-text change handler run. The problem is that this leaves the text-input field and triggers the change event before the ok-button click event.
jQ('#text-input').change(function(){
//disable other inputs until ok-button is clicked
}
jQ('#ok-button').click(function(){
//save changes and re-enable other inputs
}
The events are fired at practically the same time when clicking the ok-button while the text-input is focused, but the change event is first. Is there a simple solution to this?
http://jsfiddle.net/piyushjain7/X6K3W/