PATH:
home
/
thebhoeo
/
public_html
/
officepoint
/
wp-content
/
themes
/
woodmart
/
js
/
scripts
/
wc
/* global woodmart_settings */ (function($) { woodmartThemeModule.$document.on('pjax:complete wdProductsTabsLoaded wdShopPageInit wdLoadMoreLoadProducts wdArrowsLoadProducts', function() { woodmartThemeModule.imagesGalleryInLoop(); }); woodmartThemeModule.$document.on('wdRecentlyViewedProductLoaded', function() { $('.wd-products-element .products, .wd-carousel-container.products .wd-product') .each(function ( key, product ) { let $product = $(this); $product.trigger('wdImagesGalleryInLoopOn', $product); }); }); $.each([ 'frontend/element_ready/wd_products.default', 'frontend/element_ready/wd_products_tabs.default', 'frontend/element_ready/wd_archive_products.default', ], function(index, value) { woodmartThemeModule.wdElementorAddAction(value, function() { woodmartThemeModule.imagesGalleryInLoop(); }); }); woodmartThemeModule.imagesGalleryInLoop = function() { function addGalleryLoopEvents( neededProduct ) { $( neededProduct ) .on('mouseover mouseout', '.wd-product-grid-slide', function( e ) { let $hoverSlide = $(this); let $product = $hoverSlide.closest('.wd-product'); let $productsHolder = $product.closest('.wd-products, .wd-products .wd-carousel'); let productsGalleryAtts = $productsHolder.length > 0 && $productsHolder.data('grid-gallery') ? $productsHolder.data('grid-gallery') : {}; let grid_gallery_control = woodmart_settings.grid_gallery_control; if ( productsGalleryAtts.hasOwnProperty( 'grid_gallery_control' ) && ( null === productsGalleryAtts.grid_gallery_control || ( 'string' === typeof productsGalleryAtts.grid_gallery_control && productsGalleryAtts.grid_gallery_control.length > 0 ) ) ) { grid_gallery_control = productsGalleryAtts.grid_gallery_control; } if ( 'hover' !== grid_gallery_control || woodmartThemeModule.$window.width() <= 1024 ) { return; } let $imagesIndicator = $product.find('.wd-product-grid-slider-pagin'); let $productImage = $product.find('.product-image-link > img, .product-image-link > picture > img'); let $productImageSource = $product.find('.product-image-link > picture source'); let hoverImageUrl; let hoverImageSrcSet; let currentImagesIndicator; if ( 'mouseover' === e.type ) { let hoverSliderId = $hoverSlide.data('image-id'); hoverImageUrl = $hoverSlide.data('image-url'); hoverImageSrcSet = $hoverSlide.data('image-srcset'); currentImagesIndicator = $imagesIndicator.find(`[data-image-id="${hoverSliderId}"]`); } else { hoverImageUrl = $product.find('.wd-product-grid-slide[data-image-id="0"]').data('image-url'); hoverImageSrcSet = $product.find('.wd-product-grid-slide[data-image-id="0"]').data('image-srcset'); currentImagesIndicator = $imagesIndicator.find('[data-image-id="0"]'); } currentImagesIndicator.siblings().removeClass('wd-active'); currentImagesIndicator.addClass('wd-active'); $productImage.attr('src', hoverImageUrl ); if ( hoverImageSrcSet ) { $productImage.attr('srcset', hoverImageSrcSet ); $productImageSource.attr('srcset', hoverImageSrcSet ); } else if ( $productImage.attr('srcset' ) ) { $productImage.attr('srcset', null); $productImageSource.attr('srcset', null); } }) .on('click', '.wd-prev, .wd-next', function( e ) { e.preventDefault(); let $navButton = $(this); let $productsHolder = $navButton.closest('.wd-products, .wd-products .wd-carousel'); let productsGalleryAtts = $productsHolder.length > 0 && $productsHolder.data('grid-gallery') ? $productsHolder.data('grid-gallery') : {}; let grid_gallery_control = woodmart_settings.grid_gallery_control; let grid_gallery_enable_arrows = woodmart_settings.grid_gallery_enable_arrows; if ( productsGalleryAtts.hasOwnProperty( 'grid_gallery_control' ) && ( null === productsGalleryAtts.grid_gallery_control || ( 'string' === typeof productsGalleryAtts.grid_gallery_control && productsGalleryAtts.grid_gallery_control.length > 0 ) ) ) { grid_gallery_control = productsGalleryAtts.grid_gallery_control; } if ( productsGalleryAtts.hasOwnProperty( 'grid_gallery_enable_arrows' ) && ( null === productsGalleryAtts.grid_gallery_enable_arrows || ( 'string' === typeof productsGalleryAtts.grid_gallery_enable_arrows && productsGalleryAtts.grid_gallery_enable_arrows.length > 0 ) ) ) { grid_gallery_enable_arrows = productsGalleryAtts.grid_gallery_enable_arrows; } if ( ( woodmartThemeModule.$window.width() < 1024 && ( ! grid_gallery_enable_arrows || 'none' === grid_gallery_enable_arrows ) ) || ( woodmartThemeModule.$window.width() > 1024 && ( ! grid_gallery_control || 'arrows' !== grid_gallery_control ) ) ) { return; } let $product = $navButton.closest('.wd-product'); let $productImage = $product.find('.product-image-link > img, .product-image-link > picture > img'); let $productImageSource = $product.find('.product-image-link > picture source'); let $imagesList = $product.find('.wd-product-grid-slide'); let index = $imagesList.hasClass('wd-active') ? $product.find('.wd-product-grid-slide.wd-active').data('image-id') : 0; if ( $(this).hasClass('wd-prev') ) { index--; } else if ( $(this).hasClass('wd-next') ) { index++; } if ( -1 === index ) { index = $imagesList.length - 1; } else if ( $imagesList.length === index ) { index = 0; } let $currentImage = $product.find(`.wd-product-grid-slide[data-image-id="${index}"]`); let hoverImageUrl = $currentImage.data('image-url'); let hoverImageSrcSet = $currentImage.data('image-srcset'); $imagesList.removeClass('wd-active'); $currentImage.addClass('wd-active'); $productImage.attr('src', hoverImageUrl ) if ( hoverImageSrcSet ) { $productImage.attr('srcset', hoverImageSrcSet ); $productImageSource.attr('srcset', hoverImageSrcSet ); } else if ( $productImage.attr('srcset' ) ) { $productImage.attr('srcset', null); $productImageSource.attr('srcset', null); } }); } function removeGalleryLoopEvents( neededProduct ) { $( neededProduct ) .off( 'mouseover mouseout', '.wd-product-grid-slide' ) .off( 'click', '.wd-prev, .wd-next' ); } $('.wd-product') .each(function ( key, product ) { removeGalleryLoopEvents( product ); addGalleryLoopEvents( product ); }); woodmartThemeModule.$document .on('wdImagesGalleryInLoopOff', '.wd-product', function( e, neededProduct = this ) { removeGalleryLoopEvents( neededProduct ); }) .on('wdImagesGalleryInLoopOn', '.wd-product', function( e, neededProduct = this ) { addGalleryLoopEvents( neededProduct ); }); }; $(document).ready(function() { woodmartThemeModule.imagesGalleryInLoop(); }); })(jQuery);
[+]
..
[-] filtersArea.min.js
[edit]
[-] quickShop.min.js
[edit]
[-] loginSidebar.js
[edit]
[-] shopLoader.min.js
[edit]
[-] woocommerceWrappTable.min.js
[edit]
[-] abandonedCart.min.js
[edit]
[-] product360Button.min.js
[edit]
[-] swatchesLimit.js
[edit]
[-] frequentlyBoughtTogether.js
[edit]
[-] quickShopVariationForm.min.js
[edit]
[-] trackProductViewed.min.js
[edit]
[-] frequentlyBoughtTogether.min.js
[edit]
[-] sortByWidget.js
[edit]
[-] woocommerceQuantity.min.js
[edit]
[-] stickyDetails.min.js
[edit]
[-] filterDropdowns.min.js
[edit]
[-] commentImage.min.js
[edit]
[-] woocommerceQuantity.js
[edit]
[-] singleProductTabsAccordion.js
[edit]
[-] addToCartAllTypes.min.js
[edit]
[-] swatchesVariations.min.js
[edit]
[-] loginTabs.js
[edit]
[-] categoriesAccordion.min.js
[edit]
[-] checkoutRemoveBtn.min.js
[edit]
[-] productImagesGallery.js
[edit]
[-] singleProductTabsSideHidden.js
[edit]
[-] stickyAddToCart.js
[edit]
[-] swatchesVariations.js
[edit]
[-] imagesGalleryInLoop.min.js
[edit]
[-] quickShop.js
[edit]
[-] product360Button.js
[edit]
[-] initZoom.js
[edit]
[-] emailSubscriptionCheckboxes.min.js
[edit]
[-] headerCategoriesMenu.js
[edit]
[-] headerCategoriesMenu.min.js
[edit]
[-] freeGiftsTable.js
[edit]
[-] wishlist.min.js
[edit]
[-] checkoutQuantity.min.js
[edit]
[-] ptSubscribeForm.min.js
[edit]
[-] productHover.js
[edit]
[-] updateAjaxDeliveryDates.js
[edit]
[-] productMoreDescription.min.js
[edit]
[-] woocommercePriceSlider.min.js
[edit]
[-] productImages.js
[edit]
[-] productReviewsLikes.min.js
[edit]
[-] filterDropdowns.js
[edit]
[-] singleProductTabsAccordion.min.js
[edit]
[-] shopMasonry.min.js
[edit]
[-] woodmartCompare.js
[edit]
[-] searchByFilters.js
[edit]
[-] gridQuantity.min.js
[edit]
[-] swatchesOnGrid.js
[edit]
[-] productsLoadMore.min.js
[edit]
[-] productGalleryVideo.js
[edit]
[-] variationsPrice.min.js
[edit]
[-] productReviewsCriteria.js
[edit]
[-] emailSubscriptionCheckboxes.js
[edit]
[-] freeGiftsTable.min.js
[edit]
[-] dynamicDiscountsTable.min.js
[edit]
[-] waitlistTable.min.js
[edit]
[-] abandonedCart.js
[edit]
[-] shopMasonry.js
[edit]
[-] wishlistGroup.js
[edit]
[-] wishlist.js
[edit]
[-] checkoutFields.js
[edit]
[-] addToCartAllTypes.js
[edit]
[-] imagesGalleryInLoop.js
[edit]
[-] productReviews.js
[edit]
[-] waitlistSubscribeForm.min.js
[edit]
[-] categoriesDropdowns.min.js
[edit]
[-] filtersArea.js
[edit]
[-] cartWidget.min.js
[edit]
[-] estimateDeliveryOnCart.js
[edit]
[-] productRecentlyViewed.min.js
[edit]
[-] woocommerceWrappTable.js
[edit]
[-] waitlistSubscribeForm.js
[edit]
[-] productReviewsLikes.js
[edit]
[-] checkoutRemoveBtn.js
[edit]
[-] cartQuantity.min.js
[edit]
[-] productMoreDescription.js
[edit]
[-] ptSubscribeForm.js
[edit]
[-] shopPageInit.js
[edit]
[-] countProductVisits.min.js
[edit]
[-] loginDropdown.min.js
[edit]
[-] productReviewsCriteria.min.js
[edit]
[-] loginDropdown.js
[edit]
[-] actionAfterAddToCart.min.js
[edit]
[-] miniCartQuantity.js
[edit]
[-] woodmartCompare.min.js
[edit]
[-] searchByFilters.min.js
[edit]
[-] miniCartQuantity.min.js
[edit]
[-] updateCartFragmentsFix.min.js
[edit]
[-] waitlistTable.js
[edit]
[-] woocommerceNotices.min.js
[edit]
[-] onRemoveFromCart.min.js
[edit]
[-] quickShopVariationForm.js
[edit]
[-] categoriesAccordion.js
[edit]
[-] singleProductTabsSideHidden.min.js
[edit]
[-] loginTabs.min.js
[edit]
[-] checkoutFields.min.js
[edit]
[-] estimateDeliveryOnCart.min.js
[edit]
[-] productFilters.js
[edit]
[-] wishlistGroup.min.js
[edit]
[-] productRecentlyViewed.js
[edit]
[-] productFilters.min.js
[edit]
[-] shopLoader.js
[edit]
[-] productHover.min.js
[edit]
[-] quickView.min.js
[edit]
[-] checkoutQuantity.js
[edit]
[-] cartWidget.js
[edit]
[-] onRemoveFromCart.js
[edit]
[-] quickView.js
[edit]
[-] woocommerceComments.js
[edit]
[-] countProductVisits.js
[edit]
[-] dynamicDiscountsTable.js
[edit]
[-] loginSidebar.min.js
[edit]
[-] woocommerceComments.min.js
[edit]
[-] swatchesOnGrid.min.js
[edit]
[-] cartQuantity.js
[edit]
[-] productImagesGallery.min.js
[edit]
[-] updateAjaxDeliveryDates.min.js
[edit]
[-] gridQuantity.js
[edit]
[-] stickySidebarBtn.min.js
[edit]
[-] productVideo.min.js
[edit]
[-] variationsPrice.js
[edit]
[-] productReviews.min.js
[edit]
[-] woocommerceNotices.js
[edit]
[-] ajaxFilters.js
[edit]
[-] productImages.min.js
[edit]
[-] trackProductViewed.js
[edit]
[-] ptTable.min.js
[edit]
[-] actionAfterAddToCart.js
[edit]
[-] stickyAddToCart.min.js
[edit]
[-] ptTable.js
[edit]
[-] swatchesLimit.min.js
[edit]
[-] shopPageInit.min.js
[edit]
[-] productVideo.js
[edit]
[-] productGalleryVideo.min.js
[edit]
[-] ajaxFilters.min.js
[edit]
[-] stickyDetails.js
[edit]
[-] productsLoadMore.js
[edit]
[-] woocommercePriceSlider.js
[edit]
[-] sortByWidget.min.js
[edit]
[-] commentImage.js
[edit]
[-] productsTabs.min.js
[edit]
[-] productsTabs.js
[edit]
[-] categoriesDropdowns.js
[edit]
[-] initZoom.min.js
[edit]
[-] updateCartFragmentsFix.js
[edit]
[-] stickySidebarBtn.js
[edit]