1ACC.brand = { 2 3 _autoload: [ 4 ["bindBrandToggles", $(".js-toggle-brand-facets").length !== 0], 5 ["bindBrandSearchInput", $("#brandName").length !== 0], 6 ["bindBrandSearchClear", $("#brandName").length !== 0] 7 ], 8 9 10 11 bindBrandToggles: function () 12 { 13 $(document).on("click", "#js-moreBrandLetters", function(e) { 14 $("#js-moreBrandLetters").hide(); 15 $("#js-lessBrandLetters").show(); 16 $(".js-facet-list-hidden").removeClass("hidden"); 17 }); 18 19 $(document).on("click", "#js-lessBrandLetters", function(e) { 20 $("#js-lessBrandLetters").hide(); 21 $("#js-moreBrandLetters").show(); 22 $(".js-facet-list-hidden").addClass("hidden"); 23 }); 24 25 $(document).on("click", ".js-mobile-toggle-brand-facets", function(e) { 26 if ($(this).parents(".js-brand-facet").find(".js-facet-form:visible").length != 0) { 27 $(this).parents(".js-brand-facet").find(".refinement-form").hide(); 28 } else { 29 $(this).parents(".js-brand-facet").find(".refinement-form").css('display', 'flex'); 30 if ($(this).parents(".js-brand-facet").find(".js-facet-list-hidden:visible").length == 0) { 31 $(this).parents(".js-brand-facet").find("#js-moreBrandLetters").show(); 32 $(this).parents(".js-brand-facet").find("#js-lessBrandLetters").hide(); 33 } else { 34 $(this).parents(".js-brand-facet").find("#js-moreBrandLetters").hide(); 35 $(this).parents(".js-brand-facet").find("#js-lessBrandLetters").show(); 36 } 37 } 38 }); 39 40 $(document).on("click", ".js-toggle-brand-facets", function(e) { 41 if($(this).text() == '-') { 42 $(this).text("+"); 43 $(this).parents(".js-brand-facet").find(".refinement-form").hide(); 44 $(this).parents(".js-brand-facet").find("#js-lessBrandLetters").hide(); 45 $(this).parents(".js-brand-facet").find("#js-moreBrandLetters").hide(); 46 } 47 else { 48 $(this).text("-"); 49 $(this).parents(".js-brand-facet").find(".refinement-form").css('display', 'flex'); 50 if ($(this).parents(".js-brand-facet").find(".js-facet-list-hidden:visible").length == 0) { 51 $(this).parents(".js-brand-facet").find("#js-moreBrandLetters").show(); 52 $(this).parents(".js-brand-facet").find("#js-lessBrandLetters").hide(); 53 54 } else { 55 $(this).parents(".js-brand-facet").find("#js-moreBrandLetters").hide(); 56 $(this).parents(".js-brand-facet").find("#js-lessBrandLetters").show(); 57 } 58 } 59 }); 60 61 $(document).on("click", ".js-removeBrandFilter", function(e) { 62 $(this).closest('form').submit(); 63 }); 64 65 }, 66 67 bindBrandSearchInput: function () 68 { 69 $("#brandName").keypress(function() { 70 $(this).attr("list", "allBrandsList"); 71 $(this).attr("autocomplete", "on"); 72 }); 73 }, 74 75 bindBrandSearchClear: function () 76 { 77 $("#brandName").keyup(function(){ 78 if ( $(this).val().length > 0 ){ 79 $(".brand-clear-icon").show(); 80 }else{ 81 $(".brand-clear-icon").hide(); 82 } 83 }); 84 85 $(".brand-clear-icon").click(function(){ 86 $("#brandName").val(''); 87 $(".brand-clear-icon").hide(); 88 $("#brandName").focus(); 89 }); 90 } 91}; 92
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.