// jQuery(document).ready(function($){
//     // mobile side view side panel 
//     jQuery("#elex-multi-vendor-for-woocommerce-side-panel-open-btn").click(function() {
//         jQuery(".elex-multi-vendor-for-woocommerce-side-panel-bg").addClass("active");
//     });
//     jQuery("#elex-multi-vendor-for-woocommerce-side-panel-close-btn").click(function() {
//         jQuery(".elex-multi-vendor-for-woocommerce-side-panel-bg").removeClass("active");
//     });
//     jQuery(document).click(function(e) {
//         if (jQuery(e.target).is('#elex-multi-vendor-for-woocommerce-side-panel-open-btn *, #elex-multi-vendor-for-woocommerce-side-panel'));
//         else jQuery(".elex-multi-vendor-for-woocommerce-side-panel-bg").removeClass("active");
//     });
// });


var sidePanel= function () {
    $elex_mv_content_size=jQuery(".elex-multi-vendor-for-woocommerce-main").width();
    if($elex_mv_content_size <= 900){
        jQuery("#elex-multi-vendor-for-woocommerce-side-panel-container").addClass('elex-multi-vendor-for-woocommerce-side-panel-responsive');
        jQuery(".elex-multi-vendor-for-woocommerce-side-panel-open-div").addClass('d-flex');
        jQuery(".elex-multi-vendor-for-woocommerce-side-panel-open-div").removeClass('d-md-none');
        jQuery("#elex-multi-vendor-for-woocommerce-side-panel-open-btn").click(function(){
            jQuery('.elex-multi-vendor-for-woocommerce-side-panel-responsive').addClass('active');
        });
        jQuery(document).click(function(e) {
            if (jQuery(e.target).is('#elex-multi-vendor-for-woocommerce-side-panel .div, #elex-multi-vendor-for-woocommerce-side-panel *, #elex-multi-vendor-for-woocommerce-side-panel-open-btn *'));
            else jQuery(".elex-multi-vendor-for-woocommerce-side-panel-responsive").removeClass("active");
        });
    }else{
        jQuery("#elex-multi-vendor-for-woocommerce-side-panel-container").removeClass('elex-multi-vendor-for-woocommerce-side-panel-responsive');
        jQuery(".elex-multi-vendor-for-woocommerce-side-panel-open-div").removeClass('d-flex');
        jQuery(".elex-multi-vendor-for-woocommerce-side-panel-open-div").addClass('d-md-none');
    }
    
}; 
sidePanel();
jQuery(window).resize(function(){
    sidePanel();
});

jQuery(document).ready(function() {
    var divHeight = jQuery('#elex-multi-vendor-for-woocommerce-side-panel-container').height();
	jQuery('.elex-multi-vendor-for-woocommerce-main').height(divHeight);
});