Answer the question
In order to leave comments, you need to log in
Set class style if input is checked?
There is such a structure
<label class="catalog-filter-block-item-label">
<span class="custom-input-checkbox"></span>
<span class="wpcf7-form-control-wrap acceptance-987">
<input type="checkbox" name="acceptance-987" value="1" class="wpcf7-form-control wpcf7-acceptance" aria-invalid="false"></span> <span class="custom-input-checkbox-name">Ставя галочку я соглашаюсь с условиями данного соглашения и прочее</span>
</label>
.catalog-filter-block-item-label input:checked~.catalog-filter-block-item-label .custom-input-checkbox:after {
background-image: url(../images/catalog/checked-filter.png);
}
Answer the question
In order to leave comments, you need to log in
The '~' combinator selects elements that are after the specified element if they have a common parent.
Actually, change the html structure.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question