10 examples of 'jquery input value change' in JavaScript

Every line of 'jquery input value change' 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
65set value(v: any) {
66 if (v !== this._value) {
67 this._value = v;
68 this._onChangeCallback(v);
69 }
70}
255private updateDom_select(element: JQuery, value: any) {
256 element.val(value);
257}
78function onInputSelect(element) {
79 element.css('color', '#000000');
80 element.val('');
81}
31_onChange() {
32 let name = this.props.fieldId
33 let value = this.getValue()
34 this.emit('commit', name, value)
35}
23function setValue(id, value, onChange) {
24 var $value = $('#' + id + '.value');
25 if ($value.attr('type') === 'checkbox') {
26 $value.prop('checked', value).change(function() {
27 onChange();
28 });
29 } else {
30 $value.val(value).change(function() {
31 if ($(this).attr('id') === 'license') {
32 if ($(this).val()) {
33 $('#check').button('enable');
34 } else {
35 $('#check').button('disable');
36 }
37 $('#checkResult').html();
38 }
39 onChange();
40 }).keyup(function() {
41 $(this).trigger('change');
42 });
43 }
44}
197private updateDom(element: JQuery, value: any) {
198 let tag = element.prop('tagName');
199 switch (tag) {
200 case 'INPUT':
201 this.updateDom_input(element, value);
202 break;
203 case 'TEXTAREA':
204 this.updateDom_normal(element, value);
205 break;
206 case 'SELECT':
207 this.updateDom_select(element, value);
208 break;
209 default:
210 this.updateDom_normal(element, value);
211 }
212}
19function setValue(id, value, onChange) {
20 var $value = $('#' + id + '.value');
21 if ($value.attr('type') === 'checkbox') {
22 $value.prop('checked', value).change(function () {
23 onChange();
24 });
25 } else {
26 $value.val(value).on('change', function() {
27 onChange();
28 }).keyup(function() {
29 // Check that only numbers entered
30 if ($(this).hasClass('number')) {
31 var val = $(this).val();
32 if (val) {
33 var newVal = '';
34 for (var i = 0; i < val.length; i++) {
35 if ((val[i] >= '0' && val[i] <= '9') || val[i] === '-' || val[i] === '+' || val[i] === '.' || val[i] === ',') {
36 if (val[i] === '.' && convertComma === true) val[i] = ',';
37 if (val[i] === ',' && convertComma === false) val[i] = '.';
38 newVal += val[i];
39 }
40 }
41
42 if (val != newVal) {
43 $(this).val(newVal);
44 }
45 }
46 }
47 $(this).trigger('change');
48 });
49 }
50}
219onInput(val: any) {
220 this.$emit('input', val)
221}
92reg: /^height:(\d+)px/g, setValue: function setValue(v) {
93 $("#height").val(v);
94}
135} }, { reg: /^text-align:(.+)/g, setValue: function setValue(v) {
136 $("#text-align").val(v);
137} }, { reg: /^text-decoration:(.+)/g, setValue: function setValue(v) {

Related snippets