1 2/** 3 *********** jQuery plugins - FpProjecktSlider *********** 4 * includ this script in "includeJSFooterlibs" after jQuery 5 * how to use: in ready function - main.js 6 * $(document).ready(()=>{ 7 * $(".projekte-brandwall").brandwall(); // brandwall funtion 8 * $(".fp-projekte").projectslider( // projectslider function 9 * { 10 * slick:{ 11 * dots: false, 12 * infinite: false, 13 * speed: 300, 14 * slidesToShow: 3, 15 * slidesToScroll: 3, 16 * prevArrow:$(".fpproject-previous"), 17 * nextArrow:$(".fpproject-next"), 18 * responsive: [ 19 * { 20 * breakpoint: 600, 21 * settings: { 22 * slidesToShow: 3, 23 * slidesToScroll: 3, 24 * vertical: true, 25 * } 26 * } 27 * ] 28 * } 29 * } 30 * ); 31 * }) 32 */ 33 34(function( $ ) { 35 36 37 // brandwall function 38 $.fn.brandwall = function () { 39 40 this.find(".categories .category").each(function( iCategory, eCategory ) { 41 42 $(eCategory).find(".items .item").each(function( iItem, eItem ){ 43 44 $(eItem).click(()=>{ 45 46 var itemUid = $(eItem).attr("data-item-uid"), 47 groupId = $(eItem).attr("gid"), 48 itemBorderColor = $(eItem).attr("data-border-color"), 49 collapse = $(eItem).closest('.category').find('.item-details'), 50 closeButton = collapse.find(".lead"), 51 activeDetailItem = collapse.find('.item:visible'), 52 detailItem = collapse.find('.item[data-item-uid="' + itemUid + '"]'); 53 54 collapse.find(".content").attr("style","border-top:10px solid "+itemBorderColor+";") 55 56 57 // X-Button 58 closeButton.click(()=> collapse.slideUp().removeClass("active")); 59 // close all 60 if($(".item-details.active").attr("gid") !== groupId) 61 $(".item-details.active").slideUp().removeClass("active"); // close all collapse 62 63 64 $(".item-details").find(".item").hide(); // first hide all item 65 detailItem.show(); // then show selected item 66 collapse.slideDown().addClass("active"); // open collapse 67 68 // move collapse after item in Mobile 69 if($(window).width() <= 651){ 70 eItem.after(collapse[0]); 71 }else{ 72 if(collapse.parent()[0].className.split(' ')[0] !== 'category') 73 $(eItem).parent().after(collapse[0]); 74 } 75 76 77 78 }); 79 80 }) 81 82 }); 83 84 return this; 85 86 } 87 88 89 $.fn.projectslider = function ( options ){ 90 91 var settings = $.extend({ 92 slick: null 93 }, options ); 94 95 $('#FpProjektSliderContent').slick(settings.slick); 96 97 this.find(".categories").find(".category").children("a").click((e)=>{ 98 99 // add|remove (active) class to buttons 100 this.find(".categories").find(".category").children("a").removeClass("active"); 101 $(e.target).addClass("active"); 102 103 var $elements = null; 104 var uid = $(e.target).attr('uid'); 105 106 if(uid.toString().toLowerCase() === "all"){ 107 $elements = $("#FpProjektSliderData").children(".element").clone(); 108 }else{ 109 $elements = $("#FpProjektSliderData").children(".element[fpcategory-data="+uid+"]").clone(); 110 } 111 112 if($elements){ 113 $("#FpProjektSliderContent") 114 .slick('unslick') 115 .empty() 116 .append($elements) 117 .slick(settings.slick); 118 } 119 120 121 }); 122 123 124 return this; 125 } 126 127 128}( 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.