https://motorhomesandcaravansltd.co.uk/wp-content/plugins/aco-prod…/assets/js/frontend.js?ver=1.5.13
1jQuery(window).on('load berocket_ajax_products_infinite_loaded',function () { 2 3 var acoDivClass = acoplw_frontend_object.classname ? '.'+acoplw_frontend_object.classname : '.images'; 4 var enableJQ = acoplw_frontend_object.enablejquery ? parseInt(acoplw_frontend_object.enablejquery) : 0; 5 6 // Detail Page Badge 7 var badge = jQuery('.acoplw-hidden-wrap').not('header .acoplw-hidden-wrap'); 8 var flag = false; 9 if ( badge.length >= 1 ) { // Check for badges 10 var badgeCont = badge.find('.acoplw-badge').clone(); 11 jQuery(badgeCont).addClass('acoplw-singleBadge'); 12 jQuery(badgeCont).find('.acoplw-badge-icon').removeClass('acoplw-badge-listing-hide'); 13 if ( acoplw_frontend_object.classname ) { 14 jQuery(acoDivClass).each( function (index, cont) { 15 if ( !flag && !jQuery(this).is(":hidden")) { 16 var position = jQuery(this); 17 jQuery(this).css({'positon':'relative'}); 18 jQuery(badgeCont).prependTo(jQuery(position).parent()); 19 // jQuery(position).appendTo(badgeCont); 20 flag = true; 21 } 22 }); 23 badge.remove(); 24 } else { 25 jQuery('.woocommerce-product-gallery:first, .woocommerce-product-gallery--with-images:first').each( function (index, cont) { 26 var position = jQuery(this); 27 jQuery(this).css({'positon':'relative'}); 28 if ( jQuery(position).parent().hasClass('product') ) { 29 jQuery(badgeCont).prependTo(jQuery(position)); 30 } else { 31 jQuery(badgeCont).prependTo(jQuery(position).parent()); 32 } 33 flag = true; 34 }); 35 if (!flag) { 36 jQuery(acoDivClass).each( function (index, cont) { 37 if ( !flag ) { 38 var position = jQuery(this); 39 jQuery(this).css({'positon':'relative'}); 40 jQuery(badgeCont).prependTo(jQuery(position).parent()); 41 // jQuery(position).appendTo(badgeCont); 42 flag = true; 43 } 44 }); 45 } else { 46 badge.remove(); 47 } 48 } 49 } 50 51 if ( jQuery('.jet-woo-products').length ) { 52 jQuery('.jet-woo-products__item').each( function (index) { 53 if( jQuery(this).next().is('span.acoplw-badge')) { 54 var badgeCont = jQuery(this).next('.acoplw-badge'); 55 var position = jQuery(this); 56 jQuery(this).css({'positon':'relative'}); 57 jQuery(badgeCont).detach().prependTo(jQuery(position)); 58 } 59 }); 60 } 61 62 // if ( jQuery('.jet-woo-builder-products-loop').length ) { 63 // jQuery('.jet-woo-builder-product').each( function (index) { 64 // if( jQuery(this).prev().is('span.acoplw-badge')) { 65 // var badgeCont = jQuery(this).prev('.acoplw-badge').removeClass('acoplw-badge-listing-hide'); 66 // var position = jQuery(this).find('.jet-woo-builder-archive-product-thumbnail a'); 67 // jQuery(this).css({'positon':'relative'}); 68 // jQuery(badgeCont).detach().prependTo(jQuery(position)); 69 // } 70 // }); 71 // } 72 73 if ( enableJQ == 1 ) { 74 jQuery('.acoplw-badge.acoplw-badge-listing-hide:not(.acoplw-jq-badge)').each( function (index) { 75 // let ImageContainerDiv = jQuery(this).parent().find('a img').closest('a'); 76 let ImageContainerDiv = jQuery(this).parent().find('a img').parent(); 77 let badgeCont = jQuery(this); 78 // jQuery(badgeCont).removeClass('acoplw-badge-listing-hide').addClass('acoplw-jq-badge'); // removing acoplw-badge-listing-hide - loadmore plugin support 79 jQuery(badgeCont).addClass('acoplw-jq-badge'); // removing acoplw-badge-listing-hide - loadmore plugin support 80 jQuery(this).parent().find('a img').closest('a').addClass('acoplw-badgeOutter'); 81 jQuery(badgeCont).detach().prependTo(jQuery(ImageContainerDiv)); 82 83 // let badgeCont = jQuery(this); 84 // if ( !jQuery(this).parent().is('.products') ) { 85 // let ImageContainerDiv = jQuery(this).parent().find('a img').closest('a'); 86 // jQuery(this).parent().find('a img').closest('a').addClass('acoplw-badgeOutter'); 87 // jQuery(badgeCont).detach().prependTo(jQuery(ImageContainerDiv)); 88 // } else { 89 // badgeCont.removeClass('acoplw-badge-listing-hide'); 90 // badgeCont.find('span').removeClass('acoplw-badge-listing-hide'); 91 // let ImageContainerDiv = jQuery(this).next('.product').find('img').parents('a').first(); 92 // jQuery(badgeCont).detach().prependTo(jQuery(ImageContainerDiv)); 93 // } 94 }); 95 } 96 97 // Listing Page 98 // let listingBadge = jQuery('.acoplw-badge').not(acoDivClass+' .acoplw-badge'); 99 // let listFlag = false; 100 // if ( listingBadge.length >= 1 ) { // Check for badges 101 // jQuery(listingBadge).each (function() { 102 // let listingParentDiv = jQuery(this).parents('.product'); 103 // let listingImgDiv = jQuery(listingParentDiv).find('img'); 104 // let listingBadgeClone = jQuery(this); 105 // jQuery(listingParentDiv).find('img').wrap('<span class="acoplw-badgeWrap"></span>') 106 // // jQuery(this).css({'positon':'relative'}); 107 // jQuery(listingBadgeClone).prependTo(jQuery(listingImgDiv).parent()); 108 // }); 109 // } 110 111});
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.