This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* ------------------------------------------------------------------------------------------------ | |
* | |
* METHOD 1 | |
* | |
-------------------------------------------------------------------------------------------------- */ | |
// Customize WooCommerce Attributes (method 1 - no swatches/plugins) | |
function wc_custom_attr( $product ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.woocommerce div.product div.images .woocommerce-product-gallery__wrapper { | |
-webkit-transition: all cubic-bezier(.795,-.035,0,1) .5s; | |
transition: all cubic-bezier(.795,-.035,0,1) .5s; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* === Gallery paddles === */ | |
function paddles() { ?> | |
<script> | |
jQuery( function( $ ) { | |
$( document ).ready(function() { | |
$('.woocommerce-product-gallery').append('<div><span class="advanc left-paddle hidden"><i class="fas fa-angle-left"></i></span><span class="advanc right-paddle"><i class="fas fa-angle-right"></i></span></div>'); | |
var leftPaddle = document.getElementsByClassName('left-paddle'); | |
var rightPaddle = document.getElementsByClassName('right-paddle'); | |
var itemsLength = $('.woocommerce-product-gallery__image').length; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function owl_destroy() { | |
?> | |
<script> | |
jQuery( function( $ ) { | |
$(document).ready(function() { | |
function owlInitialize() { | |
if ($(window).width() < 1024) { | |
$('.products-carousel').owlCarousel(); | |
}else{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ====== SCROLL-HINT - Load scroll-hint ====== */ | |
function enqueue_scrollhint() { | |
wp_enqueue_script( 'flick', get_stylesheet_directory_uri() . '/scroll-hint.js', array ( 'jquery' ), 1.1, true); | |
} | |
add_action( 'wp_enqueue_scripts', 'enqueue_scrollhint', 30 ); | |
/* ====== SCROLL-HINT - wrap carousel div ====== */ | |
function wrap_div() { ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Owl vertical lock */ | |
function owl_scroll() { ?> | |
<script> | |
jQuery( function( $ ) { | |
$( document ).ready( function() { | |
var tapArea, startX ; | |
tapArea = document.querySelectorAll('.owl-carousel'); | |
startX = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Load hammer.js | |
* https://hammerjs.github.io | |
*/ | |
function enqueue_s() { | |
wp_enqueue_script( 'script', get_stylesheet_directory_uri() . '/hammer.min.js', array ( 'jquery' ), 1.1, true); | |
} | |
add_action( 'wp_enqueue_scripts', 'enqueue_s', 30 ); | |
/* Scroll lock js */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function owl_scroll() { ?> | |
<script> | |
jQuery( function( $ ) { | |
$( document ).ready( function() { | |
$('.owl-carousel').bind('touchstart', function(e) { | |
if ($(e.target).closest('.owl-carousel').length == 1) { | |
blockMenuHeaderScroll = true; | |
} | |
}); | |
$('.owl-carousel').bind('touchend', function() { |