PageSourceSearch

https://www.certifiednurseries.com/wp-content/plugins/woocommerce-…/js/html_types/mselect.js?ver=2.2.9.4

js certifiednurseries.com collected 2026-10-07 00:17:11 UTC 2,047 bytes, 69 lines download raw bytes

1"use strict";
2function woof_init_mselects() {
3
4    if (woof_select_type == 'chosen') {
5        jQuery('select.woof_mselect').chosen();
6    } else if (woof_select_type == 'selectwoo') {
7        try {
8            jQuery('select.woof_mselect').selectWoo();
9        } catch (e) {
10            console.log(e);
11        }
12    }
13
14    jQuery('.woof_mselect').change(function (a) {
15        var slug = jQuery(this).val();
16        var name = jQuery(this).attr('name');
17
18        //fix for multiselect if in chosen mode remove options
19        if (woof_select_type == 'chosen') {
20            var vals = jQuery(this).chosen().val();
21            jQuery('.woof_mselect[name=' + name + '] option:selected').removeAttr("selected");
22            jQuery('.woof_mselect[name=' + name + '] option').each(function (i, option) {
23                var v = jQuery(this).val();
24                if (jQuery.inArray(v, vals) !== -1) {
25                    jQuery(this).prop("selected", true);
26                }
27            });
28        }
29
30        woof_mselect_direct_search(name, slug);
31        return true;
32    });
33    var containers = jQuery('.woof_hide_empty_container_ms');
34    jQuery.each(containers, function (i, item) {
35        var selector = jQuery(item).val();
36        if (selector) {
37            jQuery(selector).hide();
38        }
39
40    });
41}
42
43function woof_mselect_direct_search(name, slug) {
44    //mode with Filter button
45    var values = [];
46    jQuery('.woof_mselect[name=' + name + '] option:selected').each(function (i, v) {
47        values.push(jQuery(this).val());
48    });
49
50    //duplicates removing
51    //http://stackoverflow.com/questions/9229645/remove-duplicates-from-javascript-array
52    values = values.filter(function (item, pos) {
53        return values.indexOf(item) == pos;
54    });
55
56    values = values.join(',');
57    if (values.length) {
58        woof_current_values[name] = values;
59    } else {
60        delete woof_current_values[name];
61    }
62
63    woof_ajax_page_num = 1;
64    if (woof_autosubmit) {
65        woof_submit_link(woof_get_submit_link());
66    }
67}
68
69

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.