I'm surprised that there doesn't seem to exist an event that fires when the text changes inside a textual input. You can subscribe to a keyup or keydown event but then you don't get clicks, you can subscribe to the blur event but then you don't get live changes or programmatic changes. I want one event that fires when the text (not the value) inside a textbox changes, when it changes, however it changes. At the moment it seems I need to attach to about six different events to get the required behavior. I want to hide an element when any of a class of textboxes has any text in them and show it when they do have text in them, but text can appear in them from the user typing, clicking, or through js.
I've written a small plugin for a popup menu. The menu html gets sent with the original page load, when my plugin is called it's positioned relative to the trigger via the JQuery position arguments (my, at, of) and hidden until the trigger is clicked.
Now, the trigger element may be replaced via an AJAX call and it's position may change. So I have bound the trigger with 'on()' and the menu positioned in the click handler instead of at setup, no problems. However since JQuery UI position doesn't support positioning of hidden elements I'm having to do...
$(selector).show();
$(selector).position({...
which makes me wince, I really want to do them the other way around. Is there a better way? Do the JQuery UI team have any plans to support hidden elements?