Have an idea?

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

repeat column labels at bottom of grid

I have a grid question (row based) where I have the column headers at the top but also want them shown at the bottom.  I tried adding some script that would repeat them after a certain row, but the rows are randomized.  Is there an easy way to do this?
asked Feb 19 by Jay Rutherford Gold (37,685 points)

1 Answer

0 votes
 
Best answer
Try this:

<script>
$(document).ready(function(){
    var tbody = $('#[% QuestionName() %]_div .inner_table > tbody');
    $(tbody).append($(tbody).children().eq(0).clone());
})
</script>


If you're on an older version of Lighthouse Studio (and have an even number of rows), we may need to add on a bit more to make the alternating colors look good.
answered Feb 19 by Zachary Platinum Sawtooth Software, Inc. (153,100 points)
selected Feb 19 by Jay Rutherford
That's a keeper!  Thanks as always sir.  Exactly what I needed.
...