Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

option heading for group of options

Can anybody help me to solve this problem? I wan to add heading above a few option in select questions option. I have 12 option and one heading for first 6 option and another for rest of options.
asked Jun 14, 2013 by IL Bronze (1,580 points)
retagged Jun 14, 2013 by Walter Williams
if this is Grid type select question. Here is the code.
<script type="text/javascript" src="/graphics/system/jquery-1.8.1.min.js"></script>
<script type="text/javascript">
jQuery.noConflict();
jQuery(document).ready(function ($) {
    $('.inner_table').children('tbody').children('tr:eq(0)').before('<tr><td colspan="2"><b>Header 1</b></td></tr>');
    $('.inner_table').children('tbody').children('tr:eq(6)').before('<tr><td colspan="2"><b>Header 2</b></td></tr>');
});
</script>
Thanks very much again.

1 Answer

+3 votes
 
Best answer
Hi , Use below code for this.

<script type="text/javascript" src="/graphics/system/jquery-1.8.1.min.js"></script>
<script type="text/javascript">
jQuery.noConflict();
jQuery(document).ready(function ($) {
    $('.clickable:eq(0)').before('<tr><td colspan="2"><b>Heading 1</b></td></tr>');
    $('.clickable:eq(6)').before('<tr><td colspan="2"><b>Heading 2</b></td></tr>');
});
</script>
answered Jun 14, 2013 by Rajesh Rana Gold (23,660 points)
selected Jun 14, 2013 by IL
Thanks ranarajesh85
Can you give me example if it is Grid type question using select there, how could it be possible?
...