Thanks for your assistance in advance.
Here's the survey link:
survey.aswatson.net/WISE/index.php/364252/lang-en
You would find two questions in the survey.
For Q1, it is a radio question. I have put the javascript you shared to the "source" of question. But it doesn't work.
For Q2, it is an array question. i have took reference to following forum and placed the javascript as instructed. As a side note, i have made some modification and they are highlighted in orange /red below:
www.limesurvey.org/forum/design-issues/1...es-for-radio-buttons
Script added to template:
.array-flexible-row.with-smileys table.subquestions-list,
.array-flexible-row.with-smileys col.havewidth {
width: auto !important;
}
.array-flexible-row.with-smileys table.subquestions-list {
border-collapse: collapse;
border-spacing: 0px;
}
.array-flexible-row.with-smileys table.subquestions-list tbody tr {
background-color: transparent !important;
}
.array-flexible-row.with-smileys thead td,
.array-flexible-row.with-smileys th.answertext {
display: none;
}
.array-flexible-row.with-smileys table.subquestions-list td.answer-item {
padding: 0;
border: none;
}
.array-flexible-row.with-smileys td.answer-item input.radio {
display:none;
}
.array-flexible-row.with-smileys td.answer-item label {
display: block;
position: relative;
top: auto;
left: auto;
width: 140px;
height: 140px;
padding: 0;
background: transparent 0 0 no-repeat;
font-size: 0;
}
.array-flexible-row.with-smileys td.answer-item input[type="radio"]:checked + label {
border: 1px solid #D9176E;
}
.array-flexible-row.with-smileys td.answer-item label::before {
border: 1px solid #DBDBDB;
border-radius: 0;
content: "";
display: inline-block;
height: 140px;
width: 140px;
left: 50%;
top: 8px;
margin-left: -31px;
position: absolute;
background: transparent 0 0 no-repeat;
opacity: 1;
filter: alpha(opacity=100);
}
.array-flexible-row.with-smileys td.answer-item.answer_cell_001 label::before { background-image: url(/WISE/upload/surveys/364252/images/Q1-01_v2.jpg); }
.array-flexible-row.with-smileys td.answer-item.answer_cell_002 label::before { background-image: url(/WISE/upload/surveys/364252/images/Q1-03_v2.jpg); }
.array-flexible-row.with-smileys td.answer-item.answer_cell_003 label::before { background-image: url(/WISE/upload/surveys/364252/images/Q1-02_v2.jpg); }
.array-flexible-row.with-smileys td.answer-item.answer_cell_004 label::before { background-image: url(/WISE/upload/surveys/364252/images/Q1-04_v2.jpg); }
.array-flexible-row.with-smileys td.answer-item.answer_cell_005 label::before { background-image: url(/WISE/upload/surveys/364252/images/Q1-05_v2.jpg); }
.array-flexible-row.with-smileys td.answer-item.answer_cell_001:hover label::before{
border: 1px solid #D9176E;
}
.array-flexible-row.with-smileys td.answer-item.answer_cell_002:hover label::before{
border: 1px solid #D9176E;
}
.array-flexible-row.with-smileys td.answer-item.answer_cell_003:hover label::before{
border: 1px solid #D9176E;
}
.array-flexible-row.with-smileys td.answer-item.answer_cell_004:hover label::before{
border: 1px solid #D9176E;
}
.array-flexible-row.with-smileys td.answer-item.answer_cell_005:hover label::before{
border: 1px solid #D9176E;
}
.array-flexible-row.with-smileys td.answer-item input[type="radio"]:focus + label::before {
outline: none;
}
.array-flexible-row.with-smileys td.answer-item label::after {
display: none;
}
Script added to the source of question:
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
$('#question{QID}').addClass('with-smileys');
});
</script>
However, the radio button is still here. And don't know how to highlight the border of image when the image is selected.
Sorry for such long message and hope you could help. Thanks !!