Every line of 'jquery option set selected' 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.
29 onSelected1(option: IOption) { 30 this.msg1 = `Selected ${option.label}`; 31 }
23 private selectedFunction (){ 24 this.result.emit(this.value); 25 }
215 function isOptionSelected(option: DebugElement): boolean { 216 return option.classes[classes.optionsItemSelected]; 217 }
81 function selectCallback(value, index) { 82 $(".demo .callback_output").prepend("<p>VALUE: " + value + ", INDEX: " + index + "</p>"); 83 }
923 selectedOption (optTargets) { 924 let key = false 925 optTargets.forEach((el) => { 926 if (el.classList.contains('active')) key = el.dataset.option 927 }) 928 return key 929 }
191 function addSelectOption(optionId, disabled) { 192 193 // add an 194 // used only by buildSelect() 195 196 if(disabled == undefined) var disabled = false; 197 198 var $O = $('#' + optionId); 199 var $option = $("") 200 .val($O.val()) 201 .attr('rel', optionId); 202 203 if(disabled) disableSelectOption($option); 204 205 $select.append($option); 206 }
191 function addSelectOption(optionId, disabled) { 192 193 // add an 194 // used only by buildSelect() 195 196 if(disabled == undefined) var disabled = false; 197 198 var jQueryO = jQuery('#' + optionId); 199 var jQueryoption = jQuery("") 200 .val(jQueryO.val()) 201 .attr('rel', optionId); 202 203 if(disabled) disableSelectOption(jQueryoption); 204 205 jQueryselect.append(jQueryoption); 206 }
66 getSelectedOption(key) { 67 return this.$refs.select2.options[this.selectedIndex()].dataset[key]; 68 }
104 function selected(what) { 105 var matched = []; 106 $(what).find("input:checked").each(function () { 107 matched.push($(this).attr("name")); 108 }); 109 return matched; 110 }
207 private setSingleSelectedOption(option: SelectItem | undefined) { 208 const previous = this.selectedItems.length > 0 ? this.optionsMap[this.selectedItems[0].value] : undefined; 209 this.selected = option ? this.optionsMap[option.value] : undefined; 210 return previous; 211 }