PageSourceSearch

https://shop.simplyspecialed.com/wp-content/plugins/woocommerce-pr…/js/html_types/mselect.js?ver=1.4.3.1

js simplyspecialed.com collected 2026-09-24 11:34:25 UTC 2,046 bytes, 68 lines download raw bytes

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

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.