Home Forums WoodMart support forum page always acutomatically reload 2 times when click on colum options on shop Reply To: page always acutomatically reload 2 times when click on colum options on shop

#194892

CYCLEPRO
Participant

Hi,

In a previous tick, we have discussed about this issue and you provided me with long code, i was tested and looked useful at that moment, and later i didn’t put any code like you mentioned. so do i need firstly delete the long code once you sent me below? for it doesn’t work because the issue still on.

https://xtemos.com/forums/topic/issue-of-4-product-grids-per-row/

function hoverSmallContent() {
jQuery(‘.woodmart-hover-base’).each(function () {
var $el = jQuery(this),
$elBtn = $el.find(‘.woodmart-add-btn’),
widthHiddenInfo = $el.outerWidth();
if (widthHiddenInfo < 255 || jQuery(window).width() <= 768) {
$el.addClass(‘add-small-content’);
if ($el.hasClass(‘woodmart-hover-base’)) {
$elBtn.addClass(‘wd-action-btn wd-add-cart-btn wd-style-icon’);
}
} else {
if ($el.hasClass(‘woodmart-hover-base’) && (jQuery(‘body’).hasClass(‘catalog-mode-on’) || jQuery(‘body’).hasClass(‘login-see-prices’))) {
$el.find(‘.wd-bottom-actions .wd-action-btn’).removeClass(‘wd-style-icon’).addClass(‘wd-style-text’);
}
}
});
}
if (jQuery(window).width() <= 768) {
hoverSmallContent();
}
jQuery(document).on(‘pjax:end’, function (xhr, textStatus, options) {
hoverSmallContent();
});

things became complicated, hope got surpport. thank you!