Save
This commit is contained in:
@@ -61,13 +61,12 @@ jQuery(function ($) {
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
jQuery(function ($) {
|
||||
$('.show-more-gallery').on('click', function (e) {
|
||||
e.preventDefault()
|
||||
|
||||
var parent = $(this).closest('.product-gallery-drafts')
|
||||
console.log(parent);
|
||||
console.log(parent)
|
||||
var productColors = parent.find(
|
||||
'.product-drafts .elementor-image-gallery .gallery'
|
||||
)
|
||||
@@ -96,158 +95,171 @@ jQuery(function ($) {
|
||||
})
|
||||
|
||||
jQuery(function ($) {
|
||||
$('#contact-form select').each(function () {
|
||||
var $this = $(this),
|
||||
numberOfOptions = $(this).children('option').length,
|
||||
defaultOptionText = $this.attr('data-placeholder') || $this.children('option').eq(0).text(); // Отримуємо текст placeholder або використовуємо перший елемент за замовчуванням
|
||||
$('#contact-form select').each(function () {
|
||||
var $this = $(this),
|
||||
numberOfOptions = $(this).children('option').length,
|
||||
defaultOptionText =
|
||||
$this.attr('data-placeholder') || $this.children('option').eq(0).text() // Отримуємо текст placeholder або використовуємо перший елемент за замовчуванням
|
||||
|
||||
$this.addClass('select-hidden');
|
||||
$this.wrap('<div class="select"></div>');
|
||||
$this.after('<div class="select-custom-text">' + defaultOptionText + '</div>');
|
||||
$this.addClass('select-hidden')
|
||||
$this.wrap('<div class="select"></div>')
|
||||
$this.after(
|
||||
'<div class="select-custom-text">' + defaultOptionText + '</div>'
|
||||
)
|
||||
|
||||
var $styledSelect = $this.next('div.select-custom-text');
|
||||
var $list = $('<ul />', {
|
||||
class: 'select-custom-options',
|
||||
}).insertAfter($styledSelect);
|
||||
var $styledSelect = $this.next('div.select-custom-text')
|
||||
var $list = $('<ul />', {
|
||||
class: 'select-custom-options',
|
||||
}).insertAfter($styledSelect)
|
||||
|
||||
for (var i = 1; i < numberOfOptions; i++) {
|
||||
$('<li />', {
|
||||
text: $this.children('option').eq(i).text(),
|
||||
rel: $this.children('option').eq(i).val(),
|
||||
}).appendTo($list);
|
||||
}
|
||||
for (var i = 1; i < numberOfOptions; i++) {
|
||||
$('<li />', {
|
||||
text: $this.children('option').eq(i).text(),
|
||||
rel: $this.children('option').eq(i).val(),
|
||||
}).appendTo($list)
|
||||
}
|
||||
|
||||
var $listItems = $list.children('li');
|
||||
var $listItems = $list.children('li')
|
||||
|
||||
$styledSelect.click(function (e) {
|
||||
e.stopPropagation();
|
||||
$('div.select-custom-text.active').not(this).each(function () {
|
||||
$(this).removeClass('active').next('ul.select-custom-options').slideUp();
|
||||
});
|
||||
$(this).toggleClass('active').next('ul.select-custom-options').slideToggle();
|
||||
});
|
||||
$styledSelect.click(function (e) {
|
||||
e.stopPropagation()
|
||||
$('div.select-custom-text.active')
|
||||
.not(this)
|
||||
.each(function () {
|
||||
$(this)
|
||||
.removeClass('active')
|
||||
.next('ul.select-custom-options')
|
||||
.slideUp()
|
||||
})
|
||||
$(this)
|
||||
.toggleClass('active')
|
||||
.next('ul.select-custom-options')
|
||||
.slideToggle()
|
||||
})
|
||||
|
||||
$listItems.click(function (e) {
|
||||
e.stopPropagation();
|
||||
$styledSelect.text($(this).text()).removeClass('active');
|
||||
$styledSelect.text($(this).text()).addClass('selected');
|
||||
$this.val($(this).attr('rel'));
|
||||
$list.slideUp();
|
||||
|
||||
});
|
||||
|
||||
$(document).click(function () {
|
||||
$styledSelect.removeClass('active');
|
||||
$list.slideUp();
|
||||
});
|
||||
$list.hide();
|
||||
});
|
||||
});
|
||||
$listItems.click(function (e) {
|
||||
e.stopPropagation()
|
||||
$styledSelect.text($(this).text()).removeClass('active')
|
||||
$styledSelect.text($(this).text()).addClass('selected')
|
||||
$this.val($(this).attr('rel'))
|
||||
$list.slideUp()
|
||||
})
|
||||
|
||||
$(document).click(function () {
|
||||
$styledSelect.removeClass('active')
|
||||
$list.slideUp()
|
||||
})
|
||||
$list.hide()
|
||||
})
|
||||
})
|
||||
|
||||
jQuery(function ($) {
|
||||
$('#hp-acc-more-box').slideUp()
|
||||
|
||||
$('#hp-acc-more-btn').on('click', function(e) {
|
||||
$('#hp-acc-more-btn').on('click', function (e) {
|
||||
e.preventDefault()
|
||||
$('#hp-acc-more-box').slideToggle()
|
||||
})
|
||||
})
|
||||
|
||||
jQuery(function ($) {
|
||||
var hash = window.location.hash;
|
||||
if (hash) {
|
||||
var hashValue = hash.substring(1).toLowerCase();
|
||||
var tabItem = $(`.eael-tabs-filter-types ul li input[filter="${hashValue}"]`);
|
||||
var hash = window.location.hash
|
||||
if (hash) {
|
||||
var hashValue = hash.substring(1).toLowerCase()
|
||||
var tabItem = $(
|
||||
`.eael-tabs-filter-types ul li input[filter="${hashValue}"]`
|
||||
)
|
||||
tabItem.trigger('click')
|
||||
|
||||
var visibleItems = $(".eael-tabs-nav ul li:not([style*='display: none;'])");
|
||||
var visibleItems = $(".eael-tabs-nav ul li:not([style*='display: none;'])")
|
||||
if (visibleItems.length > 0) {
|
||||
var firstVisibleItem = visibleItems.first()[0];
|
||||
setTimeout(function(){
|
||||
console.log(firstVisibleItem);
|
||||
firstVisibleItem.click();
|
||||
var firstVisibleItem = visibleItems.first()[0]
|
||||
setTimeout(function () {
|
||||
console.log(firstVisibleItem)
|
||||
firstVisibleItem.click()
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
jQuery(document).ready(function($){
|
||||
$('a[phone]').on('click', function(e){
|
||||
e.preventDefault();
|
||||
var $this = $(this);
|
||||
var phone = $this.attr('phone');
|
||||
jQuery(document).ready(function ($) {
|
||||
$('a[phone]').on('click', function (e) {
|
||||
e.preventDefault()
|
||||
var $this = $(this)
|
||||
var phone = $this.attr('phone')
|
||||
|
||||
$.ajax({
|
||||
url: '/query-contacts.php',
|
||||
type: 'GET',
|
||||
data: { phone: phone },
|
||||
success: function(response) {
|
||||
success: function (response) {
|
||||
if (response.phone) {
|
||||
var value = response.phone;
|
||||
$this.attr('href', 'tel:' + value);
|
||||
$this.find('span.elementor-icon-list-text').text(value);
|
||||
var value = response.phone
|
||||
$this.attr('href', 'tel:' + value)
|
||||
$this.find('span.elementor-icon-list-text').text(value)
|
||||
} else {
|
||||
console.log('Phone number not found in the response.');
|
||||
console.log('Phone number not found in the response.')
|
||||
}
|
||||
},
|
||||
error: function() {
|
||||
console.log('Error with the AJAX request.');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
error: function () {
|
||||
console.log('Error with the AJAX request.')
|
||||
},
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
jQuery(function($) {
|
||||
const topHeader = $('#top-header-box');
|
||||
jQuery(function ($) {
|
||||
const topHeader = $('#top-header-box')
|
||||
const centerHeader = $('#center-header-box')
|
||||
|
||||
const topHeaderOffset = topHeader.offset();
|
||||
const topHeaderHeight = topHeader.outerHeight();
|
||||
const topHeaderOffset = topHeader.offset()
|
||||
const topHeaderHeight = topHeader.outerHeight()
|
||||
|
||||
$(window).scroll(function() {
|
||||
const currentScrollPosition = $(window).scrollTop();
|
||||
$(window).scroll(function () {
|
||||
const currentScrollPosition = $(window).scrollTop()
|
||||
|
||||
if (currentScrollPosition > topHeaderOffset.top + topHeaderHeight) {
|
||||
topHeader.addClass('fixed');
|
||||
centerHeader.css('padding-top', topHeaderHeight);
|
||||
topHeader.addClass('fixed')
|
||||
centerHeader.css('padding-top', topHeaderHeight)
|
||||
} else {
|
||||
topHeader.removeClass('fixed');
|
||||
centerHeader.css('padding-top', 0);
|
||||
topHeader.removeClass('fixed')
|
||||
centerHeader.css('padding-top', 0)
|
||||
}
|
||||
});
|
||||
});
|
||||
})
|
||||
})
|
||||
|
||||
jQuery(function ($) {
|
||||
if ($('#scroller-rows').length) {
|
||||
var scrollerRows = $('#scroller-rows')
|
||||
var scrollerRowsHeight = -10
|
||||
|
||||
jQuery(function($) {
|
||||
if($('#scroller-rows').length) {
|
||||
var scrollerRows = $('#scroller-rows');
|
||||
var scrollerRowsHeight = -10;
|
||||
|
||||
scrollerRows.find('.scroller-row').each(function(){
|
||||
scrollerRows.find('.scroller-row').each(function () {
|
||||
if ($(this).index() < 2) {
|
||||
scrollerRowsHeight += $(this).height();
|
||||
scrollerRowsHeight += $(this).height()
|
||||
}
|
||||
});
|
||||
scrollerRows.css('height', scrollerRowsHeight);
|
||||
})
|
||||
scrollerRows.css('height', scrollerRowsHeight)
|
||||
}
|
||||
})
|
||||
|
||||
jQuery(function($) {
|
||||
$(document).on('click', '.elementor-menu-toggle', function(e) {
|
||||
if($(this).hasClass('elementor-active')) {
|
||||
$('header').addClass('active');
|
||||
jQuery(function ($) {
|
||||
$(document).on('click', '.elementor-menu-toggle', function (e) {
|
||||
if ($(this).hasClass('elementor-active')) {
|
||||
$('header').addClass('active')
|
||||
|
||||
$dropdown_right = $('.elementor-menu-toggle').offset().left - $(window).width() + $(this).outerWidth()
|
||||
$dropdown_right =
|
||||
$('.elementor-menu-toggle').offset().left -
|
||||
$(window).width() +
|
||||
$(this).outerWidth()
|
||||
$('.elementor-nav-menu--dropdown').css({
|
||||
'right': $dropdown_right
|
||||
right: $dropdown_right,
|
||||
})
|
||||
} else {
|
||||
$('header').removeClass('active');
|
||||
$('header').removeClass('active')
|
||||
|
||||
('.elementor-nav-menu--dropdown').css({
|
||||
'right': 0
|
||||
'.elementor-nav-menu--dropdown'.css({
|
||||
right: 0,
|
||||
})
|
||||
}
|
||||
});
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user