1jQuery(function () { 2 3 langDropDown(); 4 searchTagRemove(); 5 clearSearchForm(); 6 mycontainerforslidercontrols(); 7}); 8 9 10function langDropDown() { 11 /* Custom select design */ 12 jQuery(".drop-down").append('<div class="button"></div>'); 13 jQuery(".drop-down").append('<ul class="select-list"></ul>'); 14 jQuery(".drop-down select option").each(function () { 15 var bg = jQuery(this).css("background-image"); 16 jQuery(".select-list").append( 17 '<li class="clsAnchor"><a href="/' + jQuery(this).val() 18 + '" value="' + jQuery(this).val() 19 + '" class="' + jQuery(this).attr("class") 20 + '" style=background-image:' + bg + ">" 21 + jQuery(this).text() + "</a></li>" 22 ); 23 }); 24 jQuery(".drop-down .button").html( 25 "<a href='javascript:void(0);' class='select-list-link' style=background-image:" 26 + jQuery(".drop-down select").find(":selected").css("background-image") + ">" 27 + jQuery(".drop-down select").find(":selected").text() +"</a>" 28 ); 29 jQuery(".drop-down ul li").each(function () { 30 if ( 31 jQuery(this).find("a").text() == 32 jQuery(".drop-down select").find(":selected").text() 33 ) { 34 jQuery(this).addClass("active"); 35 } 36 }); 37 jQuery(".drop-down .select-list a").on("click", function () { 38 var dd_text = jQuery(this).text(); 39 var dd_img = jQuery(this).css("background-image"); 40 var dd_val = jQuery(this).attr("value"); 41 jQuery(".drop-down .button").html( 42 "<a href='javascript:void(0);' class='select-list-link' style=background-image:" + 43 dd_img + 44 ">" + 45 dd_text + 46 "</a>" 47 ); 48 jQuery(".drop-down .select-list a").parent().removeClass("active"); 49 jQuery(this).parent().addClass("active"); 50 $(".drop-down select[name=options]").val(dd_val); 51 $(".drop-down .select-list li").slideUp(); 52 }); 53 jQuery(".drop-down .button").on("click", "a.select-list-link", function () { 54 jQuery(".drop-down ul li").slideToggle(); 55 }); 56 /* End */ 57} 58 59function searchTagRemove() { 60 $(document).on('click','.tag-remove' , function () { 61 const parent = $(this).parents("li"); 62 const form = $(".primary-form"); 63 // get the name of tag and his value(for search or multy selection) 64 const tag = parent.data("tag"); 65 const val = parent.data("val"); 66 67 const el = form.find(`[name*=${tag}]`); 68 if(!el.length){ 69 console.error(`There is not ${tag} tag `); 70 }else if(el.length > 1){ 71 form.find(`[name*=${tag}][value=${val}]`).prop("checked",false); 72 }else if(!el.val().includes(',')){ 73 el.val(""); 74 }else{ 75 parts = el.val().split(',').filter(p => p.trim() !== val.trim()); 76 el.val(parts); 77 } 78 79 parent.remove(); 80 }) 81} 82 83function clearSearchForm(){ 84 $(document).on('click','.clear-form-btn' , function () { 85 const form = $(".primary-form"); 86 form.find(':input') 87 .not(':button, :submit, :reset, :hidden') 88 .val('') 89 .prop('checked', false) 90 .prop('selected', false); 91 92 $(".search-tags").remove(); 93 }); 94} 95 96function mycontainerforslidercontrols(){ 97 $('#myCarousel').on('slide.bs.carousel', function() { 98 currentIndex = $('.item.slidersize.active').index()+1; 99 $('.mycontainerforslidercontrols .current').html(currentIndex); 100 }); 101 102}
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.