如果没有附加帖子,是否可以隐藏过滤器复选框选项?

时间:2019-09-03 08:08:53

标签: jquery wordpress plugins

因此,我目前正在使用一个名为“ Jet Smart过滤器”的插件,我知道他们尚未开发此功能。但我当时认为jQuery必须有一个临时解决方案。

问题在于,即使没有附加任何帖子,过滤器也会显示附加到当前术语的所有可能的过滤器选项。

我的问题是我是否可以隐藏为空/没有结果的过滤器选项。

<div class="elementor-element elementor-element-57d2bd1 elementor-widget elementor-widget-jet-smart-filters-checkboxes" data-id="57d2bd1" data-element_type="widget" data-widget_type="jet-smart-filters-checkboxes.default">
    <div class="elementor-widget-container">
        <div class="jet-smart-filters-checkboxes jet-filter">
            <div class="jet-checkboxes-list" data-query-type="tax_query" data-query-var="comptetities" data-smart-filter="checkboxes" data-filter-id="518" data-content-provider="jet-engine" data-query-id="default" data-query-var-suffix="">
                <div class="jet-filter-label">Filter op competitie</div>
                <div class="jet-checkboxes-list-wrapper">
                    <div class="jet-checkboxes-list__row">
                        <label class="jet-checkboxes-list__item">
                            <input type="checkbox" class="jet-checkboxes-list__input" autocomplete="off" name="comptetities" value="174" data-apply-provider="jet-engine" data-apply-type="ajax" data-query-id="default">
                            <span class="jet-checkboxes-list__decorator"><i class="jet-checkboxes-list__checked-icon fa fa-check"></i></span>
                            <span class="jet-checkboxes-list__label">Bundesliga</span>
                        </label>
                    </div>
                    <div class="jet-checkboxes-list__row">
                        <label class="jet-checkboxes-list__item">
                            <input type="checkbox" class="jet-checkboxes-list__input" autocomplete="off" name="comptetities" value="173" data-apply-provider="jet-engine" data-apply-type="ajax" data-query-id="default">
                            <span class="jet-checkboxes-list__decorator"><i class="jet-checkboxes-list__checked-icon fa fa-check"></i></span>
                            <span class="jet-checkboxes-list__label">Champions League</span>
                        </label>
                    </div>
                    <div class="jet-checkboxes-list__row">
                        <label class="jet-checkboxes-list__item">
                            <input type="checkbox" class="jet-checkboxes-list__input" autocomplete="off" name="comptetities" value="171" data-apply-provider="jet-engine" data-apply-type="ajax" data-query-id="default">
                            <span class="jet-checkboxes-list__decorator"><i class="jet-checkboxes-list__checked-icon fa fa-check"></i></span>
                            <span class="jet-checkboxes-list__label">Premier League</span>
                        </label>
                    </div>
                    <div class="jet-checkboxes-list__row">
                        <label class="jet-checkboxes-list__item">
                            <input type="checkbox" class="jet-checkboxes-list__input" autocomplete="off" name="comptetities" value="217" data-apply-provider="jet-engine" data-apply-type="ajax" data-query-id="default">
                            <span class="jet-checkboxes-list__decorator"><i class="jet-checkboxes-list__checked-icon fa fa-check"></i></span>
                            <span class="jet-checkboxes-list__label">Primera División</span>
                        </label>
                    </div>
                    <div class="jet-checkboxes-list__row">
                        <label class="jet-checkboxes-list__item">
                            <input type="checkbox" class="jet-checkboxes-list__input" autocomplete="off" name="comptetities" value="216" data-apply-provider="jet-engine" data-apply-type="ajax" data-query-id="default">
                            <span class="jet-checkboxes-list__decorator"><i class="jet-checkboxes-list__checked-icon fa fa-check"></i></span>
                            <span class="jet-checkboxes-list__label">Scottish Premiership</span>
                        </label>
                    </div>
                    <div class="jet-checkboxes-list__row">
                        <label class="jet-checkboxes-list__item">
                            <input type="checkbox" class="jet-checkboxes-list__input" autocomplete="off" name="comptetities" value="214" data-apply-provider="jet-engine" data-apply-type="ajax" data-query-id="default">
                            <span class="jet-checkboxes-list__decorator"><i class="jet-checkboxes-list__checked-icon fa fa-check"></i></span>
                            <span class="jet-checkboxes-list__label">Serie A</span>
                        </label>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

0 个答案:

没有答案