最近チェックしたアイテム
5
20
large
off
horizontal
off
#000000
#333333
#ffffff
let timerRV = setInterval(function() {
if ($ && $.fn && $.fn.slick) {
mainRV();
clearInterval(timerRV);
} else {
console.log('waiting for jQuery and slick');
console.log('jQuery', $);
console.log('jQuery.fn', $.fn);
console.log('jQuery.fn.slick', $.fn.slick);
}
}, 1000);
document.querySelector('#spHeaderBrand__topMenu__btn').addEventListener('click', function() {
$('.sidebar-recentlyview').slick('unslick');
$(".sidebar-recentlyview").slick({
slidesToShow: 2.5,
slidesToScroll: 1,
arrows: true,
infinite: false,
autoplay: false,
initialSlide: 0
});
});
function mainRV() {
var divParent = document.createElement('div');
divParent.setAttribute('class', 'sidebar-recentlyview-main');
$('.spHeaderBrand__detailMenu__recentlyViewedItems__header .information-accordion').append(divParent);
var divChild = document.createElement('div');
divChild.setAttribute('class', 'sidebar-recentlyview');
$('.sidebar-recentlyview-main').append(divChild);
const sidebarAppend = document.querySelectorAll('.Qe_Recently-view .slick-slide:not(.slick-cloned)');
Array.from(sidebarAppend).forEach((element, index) => {
var eleHtml = element.innerHTML;
$('.sidebar-recentlyview').append(eleHtml);
});
$(".sidebar-recentlyview").slick({
slidesToShow: 2.5,
slidesToScroll: 1,
arrows: true,
infinite: false,
autoplay: false,
initialSlide: 0
});
$('.recently_sliders').slick('unslick');
$('.recently_sliders').slick({
slidesToShow: 5,
infinite: false,
slidesToScroll: 1,
centerMode: false,
responsive: [{
breakpoint: 749,
settings: {
slidesToShow: 2.5
}
}]
});
$('.Qe_Recently-view').addClass('slick-active');
$(".product_price_regular").each(function() {
var salePriceElement = $(this).find('s').next();
var regularPriceElement = $(this).text();
var regularPriceTextArray = regularPriceElement.split(/\s+/);
var salePriceText = regularPriceTextArray[1];
var regularPriceText = regularPriceTextArray[0];
var oldPrice = regularPriceTextArray[1];
var newPrice = regularPriceTextArray[3];
$(this).empty();
var regularPriceNumber = Number(regularPriceText.slice(1).replace(/,/g, ''));
var salePriceNumber = Number(salePriceText.slice(1).replace(/,/g, ''));
//var differenceInPrice = regularPriceNumber - salePriceNumber;
regularPriceNumber = parseFloat(oldPrice.replace(/[^0-9.-]+/g, ""));
salePriceNumber = parseFloat(newPrice.replace(/[^0-9.-]+/g, ""));
var differenceInPrice = regularPriceNumber - salePriceNumber;
console.log('differenceInPrice', differenceInPrice);
var discountPercent = Math.round(differenceInPrice / regularPriceNumber * 100);
console.log('discountPercent', discountPercent);
var wrapperElement = document.createElement('div');
wrapperElement.setAttribute('class', 'products-card__price');
var priceElement = document.createElement('span');
priceElement.setAttribute('class', 'products-card__price');
if (discountPercent !== 0) {
priceElement.classList.add('onSale');
priceElement.innerHTML = regularPriceText + newPrice.split('.').shift();
}else{
priceElement.innerHTML = regularPriceText + salePriceText.split('.').shift();
}
var taxElement = document.createElement('span');
taxElement.setAttribute('class', 'products-card__price__tax');
taxElement.innerHTML = '税込';
if (discountPercent !== 0) {
taxElement.classList.add('onSale');
}
wrapperElement.appendChild(priceElement);
wrapperElement.appendChild(taxElement);
if (discountPercent !== 0) {
var discountElement = document.createElement('span');
discountElement.setAttribute('class', 'products-card__price__discount');
discountElement.innerHTML = discountPercent + '%OFF';
wrapperElement.appendChild(discountElement);
}
$(this).append(wrapperElement);
});
}
@media screen and (max-width: 749px) {
.Qe_Recently-view {
padding: 0 1.5rem;
}
}
.Qe_Recently-view {
max-width: 1200px;
margin: 0 auto;
margin-top: 40px;
}
.Qe_Recently-view .product_title {
font-family: var(--font-heading-family);
font-style: var(--font-heading-style);
font-weight: var(--font-heading-weight) !important;
letter-spacing: calc(var(--font-heading-scale) * 0.06rem) !important;
color: rgb(var(--color-foreground)) !important;
line-height: calc(1 + 0.3 / max (1, var(--font-heading-scale)));
word-break: break-word;
font-size: calc(var(--font-heading-scale) * 1.3rem) !important;
}
.recently_sliders .slick-arrow:before {
font-size: 22px !important;
}
.Qe_Recently-view .recently-viewed-ttl {
font-size: 18px;
font-weight: 700;
}
.Qe_Recently-view .product_price_main .product_price {
color: #161616 !important;
font-size: 14px;
min-height: 28px;
font-weight: 400;
margin-top: 3px;
}
@media screen and (max-width: 749px) {
.Qe_Recently-view .product_price_main .product_price {
margin-top: 2px;
}
}
.Qe_Recently-view .product_price_main .product_price s {
display: none;
}
.Qe_Recently-view .box-slider .productImg {
position: relative;
aspect-ratio: 5/6;
width: 100%;
display: block;
line-height: 0;
}
.Qe_Recently-view .box-slider .productImg img {
aspect-ratio: 5/6;
width: 100%;
object-fit: cover;
}
.Qe_Recently-view .box-slider .product_title {
font-size: 12px !important;
margin-bottom: 0;
margin-top: 4px;
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
color: rgba(var(--color-foreground), 0.75) !important;
}
.Qe_Recently-view .product_price_main .product_price {
font-size: 14px;
min-height: 28px;
font-weight: 400;
margin-top: 3px;
color: rgba(var(--color-foreground), 0.75);
}
.Qe_Recently-view .product_price_main .products-card__price {
font-size: 14px;
min-height: 28px;
font-weight: 400;
margin-top: 3px;
color: #202124;
}
.Qe_Recently-view .product_price_main .products-card__price.onSale {
color: #e04f4f;
}
.Qe_Recently-view .product_price_main .products-card__price__tax {
font-size: 10px;
margin-left: 3px;
color: #202124;
}
.Qe_Recently-view .product_price_main .products-card__price__tax.onSale {
color: #e04f4f;
}
@media only screen and (max-width: 1160px) {
.sidebar-recentlyview-main .box-slider a {
text-decoration: none;
font-size: 12px !important;
margin-bottom: 0;
margin-top: 4px;
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
text-align: left;
margin-left: 0;
}
.sidebar-recentlyview-main .box-slider .productImg {
position: relative;
aspect-ratio: 5/6;
width: 100%;
display: block;
line-height: 0;
}
.sidebar-recentlyview-main .box-slider .product_title {
margin: 0;
padding: 0 0px 0 0;
font-size: 12px;
font-weight: 500;
letter-spacing: 0;
text-align: center;
color: #fff !important;
}
.sidebar-recentlyview-main .box-slider a .productImg img {
aspect-ratio: 5/6;
width: 100%;
object-fit: cover;
}
.sidebar-recentlyview-main .product_price_main {
text-align: center;
font-size: 12px;
}
.sidebar-recentlyview-main .product_price_main .product_price {
text-align: left !important;
font-size: 12px;
color: #fff !important;
}
.sidebar-recentlyview-main .slick-next {
z-index: 9;
}
.sidebar-recentlyview-main .slick-prev {
z-index: 9;
}
.sidebar-recentlyview-main {
margin: 10px 0px;
}
}
@media only screen and (max-width: 480px) {
.sidebar-recentlyview-main .slick-next {
right: -11px;
}
.sidebar-recentlyview-main .slick-prev {
left: -11px;
}
.sidebar-recentlyview-main .box-slider .productImg {
margin: 0px;
text-align: center;
}
.spHeaderBrand__detailMenu__recentlyViewedItems__header {
padding: 0 15px;
}
.sidebar-recentlyview-main .box-slider a .productImg img {
/* max-width: 90%;
margin: 0 auto; */
}
.spHeaderBrand__detailMenu__recentlyViewedItems__header .information-accordion summary svg {
position: relative;
right: 4px;
}
.sidebar-recentlyview-main .box-slider .product_title {
margin: 15px 0 0 0px;
color: #fff !important;
}
}
.slick-track {
margin-left: 0px !important;
}
.Qe_Recently-view:not(.slick-active) {
display: none !important;
}
.Qe_Recently-view .box-slider .product_title {
text-align: left !important;
}
.spHeaderBrand__detailMenu__recentlyViewedItems__header .slick-prev:before{
content: "prev";
color: #aeaeae;
font-size: 30px!important;
font-weight: 700;
text-shadow: 0.5px 0.5px 0.5px #808080;
font-family: swiper-icons;
font-size: var(--swiper-navigation-size);
text-transform: none!important;
letter-spacing: 0;
font-variant: initial;
line-height: 1;
}
.spHeaderBrand__detailMenu__recentlyViewedItems__header .slick-next:before {
content: "next";
color: #aeaeae;
font-size: 30px!important;
font-weight: 700;
text-shadow: 0.5px 0.5px 0.5px #808080;
font-family: swiper-icons;
font-size: var(--swiper-navigation-size);
text-transform: none!important;
letter-spacing: 0;
font-variant: initial;
line-height: 1;
}
¥
JPY
off
Best Seller Items