| Linux server27.hostingraja.org 2.6.32-954.3.5.lve1.4.93.el6.x86_64 #1 SMP Wed Oct 4 17:04:29 UTC 2023 x86_64 Path : /home/udaipurk/public_html/websites/rishh/XStore Theme/xstore/js/theme/fixes/ |
| Current File : //home/udaipurk/public_html/websites/rishh/XStore Theme/xstore/js/theme/fixes/plugin-woocommerce.js |
/**
* Fix for WooCommerce select2 when select have less then 5 items
*
* @version 1.0.0
* @since 1.0.0
*/
;(function ($) {
"use strict";
etTheme.autoinit.WooSelect2Fix = function () {
$('.woocommerce-widget-layered-nav-dropdown').on('select2:open', function (e) {
$(this).addClass('et_just-opened');
setTimeout(function(){
$('.et_just-opened').removeClass('et_just-opened');
}, 150);
}).on('select2:selecting', function (e) {
if ($(this).hasClass('et_just-opened')){
e.preventDefault();
}
}).on('select2:closing', function (e) {
if ($(this).hasClass('et_just-opened')){
e.preventDefault();
}
});
};// End of WooSelect2Fix
})(jQuery);