I'm a beginner in JS scripting, i create a new Array (numbers) with Dropdrown list. I would like to put category separator on it. (See the picture in attachment)
You can add something like this to the question text:
Code:
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
// Add a class to the question
$('#question{QID}').addClass('with-separator-options');
// Loop through all dropdowns in this question
$('#question{QID} .answer-item select').each(function(i) {
// Insert a separator before the option with value 1
$('option[value="1"]', this).before('<option value="" disabled>Separator 1</option>');
// Insert a separator before the option with value 5
$('option[value="5"]', this).before('<option value="" disabled>Separator 2</option>');
});
});
</script>
And then add something like this to the end of template.css: