1(function( $ ) { 2 'use strict'; 3 4 /** 5 * All of the code for your public-facing JavaScript source 6 * should reside in this file. 7 * 8 * Note that this assume you're going to use jQuery, so it prepares 9 * the $ function reference to be used within the scope of this 10 * function. 11 * 12 * From here, you're able to define handlers for when the DOM is 13 * ready: 14 * 15 * $(function() { 16 * 17 * }); 18 * 19 * Or when the window is loaded: 20 * 21 * $( window ).load(function() { 22 * 23 * }); 24 * 25 * ...and so on. 26 * 27 * Remember that ideally, we should not attach any more than a single DOM-ready or window-load handler 28 * for any particular page. Though other scripts in WordPress core, other plugins, and other themes may 29 * be doing this, we should try to minimize doing that in our own work. 30 * 31 * using http://jscompress.com/ for minimization 32 * 33 */ 34 35 /** 36 * jquery.matchHeight-min.js master 37 * http://brm.io/jquery-match-height/ 38 * License: MIT 39 */ 40 (function(c){var n=-1,f=-1,g=function(a){return parseFloat(a)||0},r=function(a){var b=null,d=[];c(a).each(function(){var a=c(this),k=a.offset().top-g(a.css("margin-top")),l=0<d.length?d[d.length-1]:null;null===l?d.push(a):1>=Math.floor(Math.abs(b-k))?d[d.length-1]=l.add(a):d.push(a);b=k});return d},p=function(a){var b={byRow:!0,property:"height",target:null,remove:!1};if("object"===typeof a)return c.extend(b,a);"boolean"===typeof a?b.byRow=a:"remove"===a&&(b.remove=!0);return b},b=c.fn.matchHeight= 41 function(a){a=p(a);if(a.remove){var e=this;this.css(a.property,"");c.each(b._groups,function(a,b){b.elements=b.elements.not(e)});return this}if(1>=this.length&&!a.target)return this;b._groups.push({elements:this,options:a});b._apply(this,a);return this};b._groups=[];b._throttle=80;b._maintainScroll=!1;b._beforeUpdate=null;b._afterUpdate=null;b._apply=function(a,e){var d=p(e),h=c(a),k=[h],l=c(window).scrollTop(),f=c("html").outerHeight(!0),m=h.parents().filter(":hidden");m.each(function(){var a=c(this); 42 a.data("style-cache",a.attr("style"))});m.css("display","block");d.byRow&&!d.target&&(h.each(function(){var a=c(this),b="inline-block"===a.css("display")?"inline-block":"block";a.data("style-cache",a.attr("style"));a.css({display:b,"padding-top":"0","padding-bottom":"0","margin-top":"0","margin-bottom":"0","border-top-width":"0","border-bottom-width":"0",height:"100px"})}),k=r(h),h.each(function(){var a=c(this);a.attr("style",a.data("style-cache")||"")}));c.each(k,function(a,b){var e=c(b),f=0;if(d.target)f= 43 d.target.outerHeight(!1);else{if(d.byRow&&1>=e.length){e.css(d.property,"");return}e.each(function(){var a=c(this),b={display:"inline-block"===a.css("display")?"inline-block":"block"};b[d.property]="";a.css(b);a.outerHeight(!1)>f&&(f=a.outerHeight(!1));a.css("display","")})}e.each(function(){var a=c(this),b=0;d.target&&a.is(d.target)||("border-box"!==a.css("box-sizing")&&(b+=g(a.css("border-top-width"))+g(a.css("border-bottom-width")),b+=g(a.css("padding-top"))+g(a.css("padding-bottom"))),a.css(d.property, 44 f-b))})});m.each(function(){var a=c(this);a.attr("style",a.data("style-cache")||null)});b._maintainScroll&&c(window).scrollTop(l/f*c("html").outerHeight(!0));return this};b._applyDataApi=function(){var a={};c("[data-match-height], [data-mh]").each(function(){var b=c(this),d=b.attr("data-mh")||b.attr("data-match-height");a[d]=d in a?a[d].add(b):b});c.each(a,function(){this.matchHeight(!0)})};var q=function(a){b._beforeUpdate&&b._beforeUpdate(a,b._groups);c.each(b._groups,function(){b._apply(this.elements, 45 this.options)});b._afterUpdate&&b._afterUpdate(a,b._groups)};b._update=function(a,e){if(e&&"resize"===e.type){var d=c(window).width();if(d===n)return;n=d}a?-1===f&&(f=setTimeout(function(){q(e);f=-1},b._throttle)):q(e)};c(b._applyDataApi);c(window).bind("load",function(a){b._update(!1,a)});c(window).bind("resize orientationchange",function(a){b._update(!0,a)})})(jQuery); 46 47 /*! 48 * jQuery UI Touch Punch 0.2.3 49 * 50 * Copyright 2011â2014, Dave Furfero 51 * Dual licensed under the MIT or GPL Version 2 licenses. 52 * 53 * Depends: 54 * jquery.ui.widget.js 55 * jquery.ui.mouse.js 56 */ 57 !function(a){function f(a,b){if(!(a.originalEvent.touches.length>1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery); 58 59 60 $(function() { 61 62 /**** slider js ****/ 63 64 $('.wp-compear-tool-slider').each(function (idx, item) { 65 66 var carouselId = "carousel" + idx; 67 this.id = carouselId; 68 69 var lg_show = parseInt($(this).attr('data-lg-show')); 70 var lg_scroll = parseInt($(this).attr('data-lg-scroll')); 71 var lg_prevnext = $(this).attr('data-lg-prevnext'); 72 if(lg_prevnext=='on'){var lg_prevnext_check=true;}else{var lg_prevnext_check=false;} 73 var lg_counter = $(this).attr('data-lg-counter'); 74 if(lg_counter=='on'){var lg_counter_check=true;}else{var lg_counter_check=false;} 75 76 var md_show = parseInt($(this).attr('data-md-show')); 77 var md_scroll = parseInt($(this).attr('data-md-scroll')); 78 79 $(this).slick({ 80 infinite: true, 81 arrows: lg_prevnext_check, 82 dots: lg_counter_check, 83 slidesToShow: lg_show, 84 slidesToScroll: lg_scroll, 85 responsive: [ 86 { 87 breakpoint: 960, 88 settings: { 89 slidesToShow: md_show, 90 slidesToScroll: md_scroll 91 } 92 }, 93 { 94 breakpoint: 540, 95 settings: { 96 slidesToShow: 1, 97 slidesToScroll: 1, 98 centerMode: true 99 } 100 101 } 102 ] 103 }); 104 105 $('.wp-compear-slider-slide').matchHeight(); 106 107 }); 108 109 110 111 /**** general WP ComPEAR js ****/ 112 113 // $('.wp-compear-tool-wrapper').animate({ 114 // opacity: 1 115 // }, 500, function() { 116 // // Animation complete. 117 // }); 118 119 120 121 /**** Drag and drop tool js ****/ 122 123 $('.wp-compear-tool-draganddrop .box').matchHeight(); 124 125 $( ".wp-compear-tool-draganddrop .drag-product .ghost" ).draggable({ 126 helper: "clone", 127 cursor: "crosshair" 128 }); 129 130 $( ".wp-compear-tool-draganddrop .comparison .comparison-inner .box.product" ).stop().droppable({ 131 drop: Drop, 132 tolerance: "pointer" 133 }); 134 135 function Drop(event, ui) { 136 137 ui.draggable.parent().addClass('chosen').css('box-shadow', 'none'); 138 139 var outer_parent = $(this).closest('#wp-compear-tool-draganddrop'); 140
141 var draggableProdId = ui.draggable.attr("data-topprod-number"); 142 var draggableTarget = $(this); 143 var new_product_info ='<div class="specs-table">'; 144 145 var chosen_product_info = outer_parent.find('.dragondrop-hidden-product-info span.'+draggableProdId).html(); 146 147 new_product_info += chosen_product_info; 148 new_product_info +='</div>'; 149 150 //draggableTarget.fadeOut('fast').html( new_product_info ).fadeIn('fast'); 151 152 153 var callback = function() { 154 155 156 draggableTarget.html( new_product_info ); 157 draggableTarget.animate({opacity: 1}, 100); 158 159 outer_parent.find('span.data-spec-order-1').matchHeight(); 160 outer_parent.find('span.data-spec-order-2').matchHeight(); 161 outer_parent.find('span.data-spec-order-3').matchHeight(); 162 outer_parent.find('span.data-spec-order-4').matchHeight(); 163 outer_parent.find('span.data-spec-order-5').matchHeight(); 164 outer_parent.find('span.data-spec-order-6').matchHeight(); 165 outer_parent.find('span.data-spec-order-7').matchHeight(); 166 outer_parent.find('span.data-spec-order-8').matchHeight(); 167 outer_parent.find('span.data-spec-order-9').matchHeight(); 168 outer_parent.find('span.data-spec-order-10').matchHeight(); 169 outer_parent.find('span.data-spec-order-11').matchHeight(); 170 outer_parent.find('span.data-spec-order-12').matchHeight(); 171 outer_parent.find('span.data-spec-order-13').matchHeight(); 172 outer_parent.find('span.data-spec-order-14').matchHeight(); 173 outer_parent.find('span.data-spec-order-15').matchHeight(); 174 outer_parent.find('span.data-spec-order-16').matchHeight(); 175 outer_parent.find('span.data-spec-order-17').matchHeight(); 176 outer_parent.find('span.data-spec-order-18').matchHeight(); 177 outer_parent.find('span.data-spec-order-19').matchHeight(); 178 outer_parent.find('span.data-spec-order-20').matchHeight(); 179 180 $('.box').matchHeight(); 181 182 //$.fn.matchHeight._update(); 183 }; 184 185 186 187 // speed must match that in CSS to make sure otherr CSS does not override it 188 draggableTarget.animate({ 189 opacity: 0 190 }, { 191 duration : 100, 192 easing: "swing", 193 complete: callback 194 }); 195 196 197 198 } 199 200 $(document).on("mouseenter", ".specs-table span.table-row > span", function() { 201 var spec_number = $(this).attr("data-spec-order"); 202 $(this).closest('.draganddrop-outer').find("span.data-spec-order-"+spec_number).addClass('spec-hovered'); 203 }); 204 205 $(document).on("mouseleave", ".specs-table span.table-row > span", function() { 206 var spec_number = $(this).attr("data-spec-order"); 207 $(this).closest('.draganddrop-outer').find("span.data-spec-order-"+spec_number).removeClass('spec-hovered'); 208 }); 209 210 211 212 }); 213 214 215})( 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.