Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*CSS Code*/
- [data-pf-type="MainMedia"] .splide__arrows button:disabled, [data-pf-type="MainMedia"] .splide__pagination:first-of-type,[data-pf-type="ProductList"] .splide__pagination:first-of-type {
- display: none !important;
- }
- /*JS Code*/
- const getElemIdByClassname = className => className ? className.split(' ').find(cl => cl.match(/pf-(\d)+_/)) : null
- setTimeout(() => {
- const productMedia = document.querySelectorAll('[data-pf-type="ProductMedia"]')
- productMedia.forEach(el => {
- const productId = el.getAttribute('data-product-id')
- const elId = getElemIdByClassname(el.className)
- const sliderId = elId + productId
- window.mainSlider[sliderId].options.arrows = true
- window.mainSlider[sliderId].options.arrowPath = 'm15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z'
- window.mainSlider[sliderId].mount()
- })
- },1500)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement