Lines Matching defs:selected

597      * @param selection currently selected choices
604 dupe = false, // check for whether a token we extracted represents a duplicate selected choice
1476 return this.results.find(".select2-result-selectable:not(.select2-disabled):not(.select2-selected)");
1487 if (choice.hasClass("select2-result-selectable") && !choice.hasClass("select2-disabled") && !choice.hasClass("select2-selected")) {
2202 var selected;
2209 this.opts.initSelection.call(null, this.opts.element, function(selected){
2210 if (selected !== undefined && selected !== null) {
2211 self.updateSelection(selected);
2214 self.nextSearchTerm = self.opts.nextSearchTerm(selected, self.search.val());
2223 return ((placeholderOption = this.getPlaceholderOption()) !== undefined && placeholderOption.prop("selected"))
2237 var selected = element.find("option").filter(function() { return this.selected && !this.disabled });
2238 // a single select box always has a value, no need to null check 'selected'
2239 callback(self.optionToData(selected));
2296 var selected = 0, self = this, showSearchInput = true;
2298 // find the selected element in the result list
2302 selected = i;
2309 if (initial === true && selected >= 0) {
2310 this.highlight(selected);
2349 this.opts.element.trigger({ type: "select2-selected", val: this.id(data), choice: data });
2410 .find("option").filter(function() { return this.selected }).each2(function (i, elm) {
2506 element.find("option").filter(function() { return this.selected && !this.disabled }).each2(function (i, elm) {
2554 var selected = this.container.find(".select2-search-choice-focus");
2555 if (selected.length && choice && choice[0] == selected[0]) {
2558 if (selected.length) {
2559 this.opts.element.trigger("choice-deselected", selected);
2561 selected.removeClass("select2-search-choice-focus");
2565 this.opts.element.trigger("choice-selected", choice);
2613 var selected = selection.find(".select2-search-choice-focus");
2614 var prev = selected.prev(".select2-search-choice:not(.select2-locked)");
2615 var next = selected.next(".select2-search-choice:not(.select2-locked)");
2618 if (selected.length &&
2620 var selectedChoice = selected;
2628 if (this.unselect(selected.first())) {
2633 if (this.unselect(selected.first())) {
2885 this.opts.element.trigger({ type: "selected", val: this.id(data), choice: data });
2988 unselect: function (selected) {
2992 selected = selected.closest(".select2-search-choice");
2994 if (selected.length === 0) {
2995 throw "Invalid argument: " + selected + ". Must be .select2-search-choice";
2998 data = selected.data("select2-data");
3021 selected.remove();
3039 choice.addClass("select2-selected");
3040 // mark all children of the selected parent as selected
3041 choice.find(".select2-result-selectable").addClass("select2-selected");
3048 && choice.find(".select2-result-selectable:not(.select2-selected)").length === 0) {
3049 choice.addClass("select2-selected");
3058 if(!this.opts.createSearchChoice && !choices.filter('.select2-result:not(.select2-selected)').length > 0){