html FacetWP股票媒体库(水平单选按钮)
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了html FacetWP股票媒体库(水平单选按钮)相关的知识,希望对你有一定的参考价值。
<!-- FACETWP Stock Media Library (Radio buttons horizontal) -->
<style>
.facetwp-facet.facetwp-facet-stock_media {
margin-bottom: 0;
}
.facetwp-facet-vehicle_type .facetwp-radio {
display: inline-block;
background: none;
line-height: 48px;
width: 120px;
margin: 0;
}
.facetwp-facet-stock_media .facetwp-checkbox.checked {
background: none;
}
.facetwp-facet-stock_media .facetwp-checkbox img {
opacity: 0.3;
vertical-align: top;
width: 48px;
}
.facetwp-facet-stock_media .facetwp-checkbox.checked img {
opacity: 1;
}
</style>
<script>
(function($) {
$(document).on('facetwp-loaded', function() {
var $parent = $('.facetwp-facet-stock_media');
$parent.find('.facetwp-checkbox').each(function() {
var $this = $(this);
var type = $this.attr('data-value');
var counter = $this.find('.facetwp-counter').text().replace('(', '').replace(')', '');
$this.html('<img src="https://facetwp.com/wp-content/themes/fwp/img/icons/cars/' + type + '.svg" alt="' + type + '" /> ' + counter);
});
});
})(jQuery);
</script>
以上是关于html FacetWP股票媒体库(水平单选按钮)的主要内容,如果未能解决你的问题,请参考以下文章
html facetwp汽车演示单选按钮
php facetwp添加查看所有单选按钮
php facetwp添加查看所有单选按钮
水平居中单选按钮标签
Android:水平放置单选按钮
标签和组单选按钮水平对齐