10 examples of 'jquery text change event' in JavaScript

Every line of 'jquery text change event' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
966function fireTextEvent(text_node) {
967 var event = new validate.Event("text", text_node.data);
968 walker.fireEvent(event);
969}
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

18function onTextChange(e) {
19 const index = context.store.indices.get(e.target);
20 const values = props.values.slice();
21 const value = e.target.value.trim();
22 if (values.indexOf(value) >= 0) {
23 return;
24 }
25
26 if (!value) {
27 values.splice(index, 1);
28 } else if (index === values.length) {
29 values.push(value);
30 } else {
31 values.splice(index, 1, value);
32 }
33
34 props.onChange(values);
35}
1function typeText(selector, text) {
2 $(selector).val(text);
3 $(selector).trigger('input');
4}
83$onTextFormatChanged() {
84 this.$redrawText();
85}
61valueChanged(newValue: string, oldValue: string): void {
62 if (oldValue !== undefined && newValue != oldValue) {
63 this.unbind();
64 this.bind();
65 }
66}
78var onChange = function onChange(event) {
79 var newValue = event.target.value;
80 setValue(newValue);
81
82 if (!newValue.trim()) {
83 setSuggestedFolks([]);
84 } else {
85 // simulate an async call to the backend
86 setTimeout(function () {
87 return setSuggestedFolks(folks);
88 }, 300);
89 }
90};
532function triggerTextSelection(e) {
533 var selectedText = root.getSelection(),
534 range,
535 clientRectBounds,
536 target = e.target || e.srcElement;
537
538 // The selected text is not editable
539 if (!target.isContentEditable) {
540 reloadMenuState();
541 return;
542 }
543
544 // The selected text is collapsed, push the menu out of the way
545 if (selectedText.isCollapsed) {
546 setTextMenuPosition(EDGE, EDGE);
547 textMenu.className = "text-menu hide";
548 } else {
549 range = selectedText.getRangeAt(0);
550 clientRectBounds = range.getBoundingClientRect();
551
552 // Every time we show the menu, reload the state
553 reloadMenuState();
554 setTextMenuPosition(
555 clientRectBounds.top - 5 + root.pageYOffset,
556 (clientRectBounds.left + clientRectBounds.right) / 2
557 );
558 }
559}
303_onTextChanged (se, prop) {
304 this.emit('search-terms-changed');
305 let terms = this._getTermsForSearchString(this.get_text());
306 this.active = (terms.length > 0);
307}
311private emitStateChange(text: string): void {
312 if (this.stateChanges) {
313 this.stateChanges.next(text);
314 }
315}
110private _text_change() {
111 let value = this._validate_color(
112 this._textbox.value,
113 this.model.get('value')
114 );
115 this.model.set('value', value);
116 this.touch();
117}

Related snippets