PageSourceSearch

https://plascon.co.za/wp-content/plugins/yith-store-locator-for-wo…/filters-dropdown.js?ver=fc41b88fcd9e

js plascon.co.za collected 2026-09-26 11:22:17 UTC 3,190 bytes, 88 lines download raw bytes

1( function ( $ ) {
2
3    var dropdownFilter  =   {
4
5        init    :   function(){
6			
7            $( document ).on( "click", ".wrapper-filter.type-dropdown li", dropdownFilter.manageSelectDropdown  );
8            $( document ).on( "click", ".open-dropdown", dropdownFilter.manageOpenDropdown  );
9            $( document ).on( "click", dropdownFilter.closeDropdown );
10            $( document ).on( "click", ".wrapper-filter.type-checkbox", function( e ) {
11                e.stopPropagation();
12            });
13            $( document ).on( "click", ".wrapper-filter .filter-label", function(){
14                $( this ).next( ".open-dropdown" ).trigger( 'click' );
15            } );
16        },
17
18        manageSelectDropdown : function( e ){
19            e.stopPropagation();
20
21            var wrapper_filter = $( this ).parents( ".wrapper-filter" );
22
23            $( this ).parents( "ul" ).find( "li" ).removeClass( "active" );
24            wrapper_filter.find( "input" ).prop('checked', false);
25            $( this ).addClass( "active" );
26
27            var open_dropdown   =   wrapper_filter.find( ".open-dropdown" ),
28                label           =   $( this ).find( "label" ).data( "title" );
29
30            if( open_dropdown.hasClass( "radius" ) && typeof yith_sl_store_locator !== undefined ){
31                label = yith_sl_store_locator.filter_radius_title + ': ' + label;
32            }
33
34            open_dropdown.find( ".text" ).html( label );
35
36            $( this ).find( "input" ).attr( "checked", "checked" );
37            $( this ).parents( ".wrapper-options" ).hide();
38
39            $( ".wrapper-filter.type-dropdown.active" ).removeClass( "active" );
40        },
41
42        manageOpenDropdown : function( e ){
43
44            e.stopPropagation();
45
46            var wrapper_filter          =   $( this ).parents( ".wrapper-filter" ),
47                wrapper_options         =   $( this ).next( ".wrapper-options" ),
48                is_active               =   wrapper_filter.hasClass( "active" ),
49                main_filters_container  =   $( "#yith-sl-main-filters-container" );
50
51
52            $( ".wrapper-filter.active" ).removeClass( "active" );
53
54
55            if( main_filters_container.hasClass( "layout-dropdown" ) ){
56                main_filters_container.find( ".wrapper-options" ).hide();
57            }
58
59            if( is_active ){
60                wrapper_filter.removeClass( "active" );
61                wrapper_options.hide();
62
63            }else{
64                wrapper_filter.addClass( "active" );
65                wrapper_options.show();
66            }
67        },
68
69        closeDropdown : function(){
70
71            var filters_container = $( "#yith-sl-main-filters-container" );
72
73            if( filters_container.hasClass( "layout-dropdown" ) ){
74                filters_container.find( ".wrapper-filter" ).find( ".wrapper-options" ).hide();
75            }else{
76                filters_container.find( ".wrapper-filter.type-dropdown" ).find( ".wrapper-options" ).hide();
77            }
78
79            filters_container.find( ".wrapper-filter" ).removeClass( "active" );
80        }
81
82    };
83
84	if( typeof yith_sl_store_locator != undefined ){
85		dropdownFilter.init();
86	}   
87
88} )( jQuery );

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.