My question is:
Does the span element have an internal html change element? I think that I have a gap, and when the internal html of the range changes, will it generate an event that I can achieve?
I would like to use jquery to bind to this span event.
. L
From jQuery documentation :
A change event is dispatched to an element when its value changes. This event is restricted to <input> , <textarea> and <select> elements.
<input>
<textarea>
<select>
These events are not currently supported by browsers such as IE, but what you are looking for are DOM events. See https://developer.mozilla.org/en/DOM_Events for more details.
Not. As a rule, if something internal to the script changes something, it will not trigger an event.
Nothing external to the script can edit the innerHTML of the range (if it's possibly contentEditable), so there is no event.
Why not process it when you make changes?
function updateHTML(el,newhtml,callback){ el.innerHTML=newhtml; if(typeof callback=='function')callback(el); }