- Posts: 153
- Thank you received: 8
Ask the community, share ideas, and connect with other LimeSurvey users!
<script type="text/javascript" charset="utf-8"> $(document).ready(function(){ if($('#question{QID} .ls-question-message.ls-em-tip.em_q_fn_validation') .hasClass('ls-em-error')) { $('.ls-answers.checkbox-list.answers-list.row').css( "background-color", "red" ); } });
<script type="text/javascript" charset="utf-8"> $(document).ready(function(){ if($('#question{QID} div.ls-question-message.ls-em-tip.em_q_fn_validation.ls-em-error.text-danger').is(":visible")) { $('.ls-answers.checkbox-list.answers-list.row').css( "background-color", "red" ); } }); </script>
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function() { $('body').on('change', '.secondary-item input:checkbox', function(i) { if($(this).is(':checked')) { $('.secondary-item').find('label.checkbox-label.control-label').css({ 'border-bottom': 'initial', 'background-color' : 'initial' }); } else { $('.secondary-item').find('label.checkbox-label.control-label').css({ 'border-bottom': '1px solid red', 'background-color' : '#ffeeee' }); } }); }); </script>