Skip to content

Instantly share code, notes, and snippets.

@kamlesh08
kamlesh08 / woopack-product-carousel-compatibility.js
Last active May 14, 2020 10:12
JS for compatibility issues with WooPack Product Carousel & Woo Variation Gallery and Woo Variation Swatches.
@kamlesh08
kamlesh08 / Filtering-Products-FacetWP-WooPack-Product-Grid.js
Created May 14, 2020 10:23
Inconsistent Layout while Filtering Products with FacetWP on WooPack Product Grid
(function($) {
$(document).on('facetwp-loaded', function() {
$('.woopack-products').imagesLoaded(function() {
var highestBox = 0;
$('.woopack-products > .product').css('height', '').each(function(){
if($(this).height() > highestBox) {
highestBox = $(this).height();
}
});
$('.woopack-products .product').height(highestBox);
@kamlesh08
kamlesh08 / custom-layout-content-tiles.css
Created May 18, 2020 10:17
Custom Layout for PowerPack Content Tiles Module - Beaver Addons
.pp-post-tile-left{
float: right !important;
width: 50%;
}
.pp-post-tile-left .pp-post-tile-post {
margin-left: 5px;
margin-right: 0px !important;
}
.pp-post-tile-right .pp-post-tile-post {
margin-left: 0px !important;
function fl_builder_loop_query_args_filter( $query_args ) {
if ( 'test-grid' == $query_args['settings']->id ) {
$query_args['post_parent'] = 0;
}
return $query_args;
}
add_filter( 'fl_builder_loop_query_args', 'fl_builder_loop_query_args_filter' );
@kamlesh08
kamlesh08 / sort-table-automatically.js
Last active May 21, 2020 09:09
Sort tables automatically in PowerPack Beaver Table Module
;(function($) {
$('.pp-table-wrap .tablesaw-sortable-switch select').trigger('change');
})(jQuery);
@kamlesh08
kamlesh08 / cart-form-in-2-columns.css
Last active May 22, 2020 13:26
WooCommerce Cart Form in 2 Columns
form.woocommerce-cart-form {
max-width: 60%;
float: left;
}
.woocommerce .cart-collaterals, .woocommerce-page .cart-collaterals {
width: 35%;
float: right;
}
@kamlesh08
kamlesh08 / woopack-product-carousel-alignment.css
Created May 15, 2020 08:40
WooPack Product Carousel - Aloignment of Heading & Add to Cart Button
@kamlesh08
kamlesh08 / activate-expandable-row.js
Created July 9, 2020 08:31
URL Anchor for opening an Expandable Row
(function($) {
$(window).on('load hashchange', function() {
if ( 'astrazeneca' === location.hash.replace('#', '') ) {
$('.fl-node-5eff90a74db9e .pp-er-wrap').trigger('click');
}
});
})(jQuery);
@kamlesh08
kamlesh08 / advanced-tabs-content-on-hover.js
Created July 9, 2020 09:11
View Advanced Tabs Content on Hover - PPBB - #15518
(function($) {
$(document).ready(function() {
$('.pp-tabs-labels .pp-tabs-label').on('mouseover', function() {
if ( $(this).hasClass('pp-tab-active') ) {
return;
}
$(this).trigger('click');
});
});
})(jQuery);
@kamlesh08
kamlesh08 / 15809.js
Created July 27, 2020 08:30
15809 - Image Carousel inside Expandable Row
;(function($) {
$(document).on('pp_expandable_row_toggle', function(e, selector) {
if ( selector.is('.pp-er-open') && selector.parent().find( '.fl-node-5f17183d368c0' ).length > 0 ) {
carousel_5f17183d368c0.swipers.main.update();
}
});
})(jQuery);