10 examples of 'jquery select multiple ids' in JavaScript

Every line of 'jquery select multiple ids' 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
18select(ids) {
19 if (!Array.isArray(ids)) ids = [ids];
20 return new Selection(ids);
21}
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

67function select(selectAll) {
68 var lists = $('.deplistContent.active ul');
69 for (var i = 0; i < lists.length; i++) {
70 var checks = lists[i].getElementsByTagName('input');
71 for (var j = 0; j < checks.length; j++) {
72 if (checks[j].id === 'common') {
73 continue;
74 }
75 checks[j].checked = selectAll;
76 }
77 var lis = lists[i].getElementsByTagName('li');
78 for (var n = 0; n < checks.length; n++) {
79 if (checks[n].id === 'common') {
80 continue;
81 }
82 lis[n].className = (selectAll) ? 'active' : '';
83 }
84 }
85 updateCommand();
86 return false;
87}
234function multipleSelect(mode){
235 var element_id = parseInt($("#multipleSelectionTool").data('img_container_id').split("___")[1]);
236 $(".img_container").each(function(){
237 if(!$(this).hasClass("image_selected")){
238
239 // Update the session list
240 updateListSession($(this).attr("id"), "selected", "gallery")
241
242 if (mode=='all'
243 || (mode=='from' && $(this).attr('id').split("___")[1]>element_id)
244 || (mode=='to' && $(this).attr('id').split("___")[1]<element_id)) {
245 $(this).addClass("image_selected")
246 }
247 }
248
249 })
250}
26export function select (id, selectedIndex) {
27 return {type: TABS_SELECT, id, selectedIndex}
28}
105window.MyBB.Moderation.getSelectedIds = function getSelectedIds()
106{
107 return $('input[type=checkbox][data-moderation-id]:checked').map(function () {
108 return $(this).attr('data-moderation-id');
109 }).get();
110};
8export function getSelectState(id, isSelected, preselected, unselectables) {
9 const { selected, notSelected, preSelected, unselectable } = SELECT_STATES;
10 if (preselected.indexOf(id) !== -1) { return preSelected; }
11 if (unselectables.indexOf(id) !== -1) { return unselectable; }
12 return isSelected ? selected : notSelected;
13}
7function selectId(selectedId) {
8 return function selectId(touchEvent) {
9 return (touchEvent.identifier || 0) === selectedId;
10 };
11}
237function selectDOMElement($) {
238 debug('select dom element `%s`', this.toString());
239 var domElement;
240
241 if (!this.el) {
242 var attrs = _.extend({}, _.result(this, 'attributes'));
243 if (this.id) { attrs.id = _.result(this, 'id'); }
244 if (this.className) { attrs['class'] = _.result(this, 'className'); }
245
246 var selector = '<' + _.result(this, 'tagName') + '>';
247 domElement = $(selector).attr(attrs);
248 } else {
249 domElement = $(_.result(this, 'el'));
250 }
251
252 return domElement;
253}
191function addSelectOption(optionId, disabled) {
192
193 // add an <option> to the <select>
194 // used only by buildSelect()
195
196 if(disabled == undefined) var disabled = false;
197
198 var $O = $('#' + optionId);
199 var $option = $("<option>" + $O.text() + "</option>")
200 .val($O.val())
201 .attr('rel', optionId);
202
203 if(disabled) disableSelectOption($option);
204
205 $select.append($option);
206}
191function addSelectOption(optionId, disabled) {
192
193 // add an <option> to the <select>
194 // used only by buildSelect()
195
196 if(disabled == undefined) var disabled = false;
197
198 var jQueryO = jQuery('#' + optionId);
199 var jQueryoption = jQuery("<option>" + jQueryO.text() + "</option>")
200 .val(jQueryO.val())
201 .attr('rel', optionId);
202
203 if(disabled) disableSelectOption(jQueryoption);
204
205 jQueryselect.append(jQueryoption);
206}

Related snippets