1+(function($) { 2 3 4 function wpb_wps_slider_init(){ 5 $(".wpb-woo-products-slider").each(function() { 6 7 var t = $(this), 8 auto = t.data("autoplay") ? !0 : !1, 9 rtl = t.data("direction") ? !0 : !1, 10 items = t.data("items") ? parseInt(t.data("items")) : '', 11 desktopsmall = t.data("desktopsmall") ? parseInt(t.data("desktopsmall")) : '', 12 tablet = t.data("tablet") ? parseInt(t.data("tablet")) : '', 13 mobile = t.data("mobile") ? parseInt(t.data("mobile")) : '', 14 nav = t.data("navigation") ? !0 : !1, 15 slideBy = t.data("slideby"), 16 pag = t.data("pagination") ? !0 : !1, 17 loop = t.data("loop") ? !0 : !1, 18 navTextLeft = t.data("direction") ? 'right' : 'left', 19 navTextRight = t.data("direction") ? 'left' : 'right'; 20 21 $(this).owlCarousel({ 22 autoplay: auto, 23 autoplayHoverPause: true, 24 rtl: rtl, 25 items : items, 26 responsiveClass:true, 27 responsive:{ 28 0:{ 29 items: mobile, 30 }, 31 480:{ 32 items: mobile, 33 }, 34 768:{ 35 items: tablet, 36 }, 37 1170:{ 38 1024: desktopsmall, 39 }, 40 1200:{ 41 items: items, 42 } 43 }, 44 nav: nav, 45 navText : ['<i class="wpb-wps-fa-angle-'+navTextLeft+'"></i>','<i class="wpb-wps-fa-angle-'+navTextRight+'"></i>'], 46 slideBy: slideBy, 47 dots: pag, 48 loop: loop, 49 margin: 10, 50 }); 51 }); 52 } 53 54 $(document).ready(function(){ 55 wpb_wps_slider_init(); 56 }); 57 58 // refresh the slider on ajax complete 59 $(document).ajaxComplete(function( event,xhr,options ){ 60 // $('.wpb-woo-products-slider').owlCarousel('destroy'); 61 // wpb_wps_slider_init(); 62 }); 63 64 // refresh the slider on WC cart page update 65 $( document.body ).on( 'updated_cart_totals', function() { 66 $('.wpb-woo-products-slider').owlCarousel('destroy'); 67 wpb_wps_slider_init(); 68 }); 69 70})(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.