.slick-current+.slick-slide.slick-active a img {
filter: none !important;
}
require(['jquery'], function ($) {
var removeSlash = function (string) {
return string.replace(/^\/|\/$/g, '');
}
const rootUrl = window.location.origin;
var currentUrl = window.location.href;
$('.uxnav-main-prod li a, .uxnav-main-prod li span.redir-mask').each(function () {
if (removeSlash(currentUrl) === [rootUrl, removeSlash($(this).attr('href'))].join('/') || removeSlash(currentUrl) === removeSlash($(this).attr('href')) || removeSlash(currentUrl) === [rootUrl, removeSlash($(this).attr('data-submit'))].join('/')) {
$(this).parents('li.level0.category-item').addClass('current');
}
})
})
require(['jquery'], function ($) {
const rootUrl = window.location.origin;
var currentUrl = window.location.href;
$('.uxnav-main-prod li a, .uxnav-main-prod li span.redir-mask').each(function () {
if (currentUrl === [rootUrl, $(this).attr('href')].join('/') || currentUrl === $(this).attr('href') || currentUrl === [rootUrl, $(this).attr('data-submit')].join('/')) {
$(this).parents('li.level0.category-item').addClass('current');
}
})
})
require(['jquery'], function ($) {
var removeSlash = function (string) {
return string.replace(/^\/|\/$/g, '');
}
const rootUrl = window.location.origin;
var currentUrl = window.location.href;
$('.uxnav-main-prod li a').each(function () {
if (removeSlash(currentUrl) === [rootUrl, removeSlash($(this).attr('href'))].join('/') || removeSlash(currentUrl) === removeSlash($(this).attr('href'))) {
$(this).parents('li.level0.category-item').addClass('current');
}
})
$('.uxnav-main-prod li span.redir-mask').each(function () {
if (removeSlash(currentUrl) === [rootUrl, removeSlash($(this).attr('data-submit'))].join('/')) {
$(this).parents('li.level0.category-item').addClass('current');
}
})
})
$('.uxnav li a , .uxnav li span.redir-mask').each(function () {
.... тут код с заменой и функционалом...
}
$('.uxnav li a').each(function () {
if ($(this).attr('href').replace(....) == currentUrl || rootUrl.....дальше остальные условия {
здесь код по условию
}
var relativeUrl = $('.uxnav li a');
relativeUrl.each(function () {
if ($(this).attr('href').replace(.....) == currentUrl || rootUrl.....дальше остальные условия {
здесь код по условию
}
$('.uxnav li a,').each(function () {
if ($(this).attr('href') == currentUrl || rootUrl.....дальше остальные условия {
здесь код по условию
}
$(this).attr('href').replace(/^\/|\/$/g, '')
Cannot read properties of undefined (reading 'replace')
add_action( 'wp_enqueue_scripts', 'accesspress_child_enqueue_styles' );
function accesspress_child_enqueue_styles() {
wp_enqueue_style( 'accesspress-root-google-fonts-css', get_stylesheet_directory_uri() . '/css/fonts.css ');
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style',
get_stylesheet_directory_uri() . '/css/style.css',
array('parent-style')
);
}
wp_enqueue_style( 'accesspress-root-google-fonts-css', get_stylesheet_directory_uri() . '/css/fonts.css ');