Answer the question
In order to leave comments, you need to log in
How to overcome the Firefox bug with cheked?
Hello, I've run into this problem. There is a site on 1C-Bitrix, one of the pages has a smart filter.
Sample Markup
<div class="color_f">
<label data-role="label_<?=$ar["CONTROL_ID"]?>" class="color_box ch_box">
<input
style="display:none;"
type="radio"
class="ch_input"
value="<? echo $ar["HTML_VALUE_ALT"] ?>"
name="<? echo $ar["CONTROL_NAME_ALT"] ?>"
id="<? echo $ar["CONTROL_ID"] ?>"
<? echo $ar["CHECKED"]? 'checked="checked"': '' ?>
/>
<span style="background: <?=$ar["VALUE"];?>" class="bg_color"> </span>
</label>
</div>
BX.addCustomEvent('onAjaxSuccess', function(data){
var count_color = $('.color_f :radio:checked').length;
var count_section = $('.section_f :radio:checked').length;
if (count_color > 0) {
$('.all_colors').addClass('underline');
}
if (count_section > 0) {
$('.all_section').addClass('underline');
}
$(".color_f .ch_input:checked").parent().addClass("active");
})
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question