View js.js
jQuery(document).ready(function($) { | |
let carouselSelector = '.my-carousel'; /* Change to your carousel class */ | |
let index = 3; /* Change to needed cell index */ | |
$('#%%ELEMENT_ID%%').on('click', function(e) { | |
e.preventDefault() | |
$(carouselSelector).find($(carouselSelector).children().data('carousel')).flickity( 'select', index, false, true ); | |
}); |
View code-snippet.php
/* Return the shortcode */ | |
function fluent_form_submission_count($id) { | |
return do_shortcode('[fluentform_info id="'. $id .'" info="submission_count"]'); | |
} |
View code-block.js
/* Opens slidemenu if hovering the icon or inside the slide menu */ | |
jQuery('#-slide-menu-20-28,#fancy_icon-18-28').hover(function () { | |
jQuery('#-slide-menu-20-28').stop().slideDown(); | |
}, function(){ | |
/* If you wanted to close when user moves cursor outside of the menu or icon */ | |
//jQuery('#-slide-menu-20-28').stop().slideUp(); | |
}); | |
/* Close slidemenu when clicking on the page somewhere that isn't the menu or icon */ | |
jQuery(document).on("click", function(e){ |
View fluent-form.js
(function($){ | |
$('#%%ELEMENT_ID%% form').on('fluentform_submission_success', function() { | |
/* Do something here like triggering a click on the trigger for the lightbox */ | |
$( ".click-trigger" ).click(); | |
}); | |
}(jQuery)); |
View snippet.php
/* Filter search query to only display products */ | |
add_filter('pre_get_posts','lit_search_products_only'); | |
function lit_search_products_only($query) { | |
if ($query->is_search && !is_admin() ) { | |
$query->set('post_type',array('product')); | |
} | |
return $query; |
View code-block.js
window.WP_Grid_Builder && WP_Grid_Builder.on( 'init', onInit ); | |
function onInit( wpgb ) { | |
wpgb.facets.on( 'appended', onAppended ); | |
} | |
function onAppended( content ) { | |
/* Do Lightbox */ | |
if (typeof doExtrasLightbox == 'function') { |
View code-block.php
<?php | |
global $product; | |
$image_size = 'medium'; /* Image size */ | |
$attachment_ids = $product->get_gallery_image_ids(); | |
foreach( $attachment_ids as $attachment_id ) { | |
View code-block.js
jQuery(document).ready(function($) { | |
let carouselSelector = '.my-carousel'; /* Change to your carousel class */ | |
let statusSelector = '.oxy-carousel-builder_status'; /* Change to your text component class */ | |
let $carousel = $(carouselSelector).find($(carouselSelector).children().data('carousel')); | |
var flkty = $carousel.data('flickity'); | |
if (flkty) { | |
function updateStatus() { |
View code-block.js
jQuery('.oxy-dynamic-list').on( 'append.infiniteScroll', function( event, body, path, items, response ) { | |
doExtrasLightbox(jQuery('body')); | |
}); |
NewerOlder