"use strict"; jQuery(function ($) { $(document).on('click', function (e) { if (!$(e.target).parents().hasClass("woof_select_radio_check")) { $(".woof_select_radio_check dd ul").hide(200); $(".woof_select_radio_check_opened").removeClass('woof_select_radio_check_opened'); } }); }); function woof_init_select_radio_check() { jQuery(".woof_select_radio_check dt a.woof_select_radio_check_opener").on('click', function () { var _this = this; jQuery.each(jQuery(".woof_select_radio_check_opener"), function (i, sel) { if (sel !== _this) { jQuery(this).parents('.woof_select_radio_check').find("dd ul").hide(); jQuery(this).parents('.woof_select_radio_check').find('.woof_select_radio_check_opened').removeClass('woof_select_radio_check_opened'); } }); //+++ jQuery(this).parents('.woof_select_radio_check').find("dd ul").slideToggle(200); if (jQuery(this).parent().hasClass('woof_select_radio_check_opened')) { jQuery(this).parent().removeClass('woof_select_radio_check_opened'); } else { jQuery(this).parent().addClass('woof_select_radio_check_opened'); } }); //+++ if (Object.keys(woof_current_values).length > 0) { jQuery.each(woof_current_values, function (index, value) { if (!jQuery('.woof_hida_' + index).length) { return; } value = value.toString().trim(); if (value.search(',')) { value = value.split(','); } //+++ var txt_results = new Array(); var v_results = new Array(); jQuery.each(value, function (i, v) { var txt = v; var is_in_custom = false; if (Object.keys(woof_lang_custom).length > 0) { jQuery.each(woof_lang_custom, function (i, tt) { if (i == index) { is_in_custom = true; txt = tt; } }); } if (!is_in_custom) { try { txt = jQuery("input[data-anchor='woof_n_" + index + '_' + v + "']").val(); } catch (e) { console.log(e); } if (typeof txt === 'undefined') { txt = v; } } txt_results.push(txt); v_results.push(v); }); if (txt_results.length) { jQuery('.woof_hida_' + index).addClass('woof_hida_small'); jQuery('.woof_hida_' + index).html('
'); var panel = jQuery('.woof_hida_' + index).find('.woof_products_top_panel2'); panel.show(); panel.html('