My question is:
Does have a span element the inner html change event? I think about I have a span and when the span inner html is changing it will throw an event that I can reach?
I would like to use Jquery to bind to this event of span.
l.
Use the textContent property to change the text of a span element, e.g. span. textContent = 'Replacement text' . The textContent property will set the text of the span to the provided string, replacing any of the existing content.
Use the textContent property to get the text of a span element, e.g. const text = span. textContent . The textContent property will return the text content of the span and its descendants. If the element is empty, an empty string is returned.
The <span> HTML element is a generic inline container for phrasing content, which does not inherently represent anything. It can be used to group elements for styling purposes (using the class or id attributes), or because they share attribute values, such as lang .
The <span> tag is an inline container used to mark up a part of a text, or a part of a document. The <span> tag is easily styled by CSS or manipulated with JavaScript using the class or id attribute. The <span> tag is much like the <div> element, but <div> is a block-level element and <span> is an inline element.
From the jQuery documentation:
The change event is sent to an element when its value changes. This event is limited to
<input>
elements,<textarea>
boxes and<select>
elements.
At the moment, such events are not supported by browsers like IE, but what you are looking for is DOM events. See https://developer.mozilla.org/en/DOM_Events for more information.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With