Hi
i`ve got the question type: Array Multi-Flex Numbers Checkbox variant with 15 subquestions on the y-scale and 5 subquestions on the x-scale
Now i want to change the width of the columns and used the following code in the Source Screen (Question ID is 1390; i`ve turned XSS Filter off)
<script>
jQuery(document).ready(function() {
// Get rid of all the widths that the API imposes
$( 'div#question1390 table.question col' ).attr('width', '');
$( 'div#question1390 table.question thead td' ).attr('width', '');
// Define a width for the question table so we can do so for its children
// NOTE: Keep this to 95% or less so IE will behave
$( 'div#question1390 table.question' ).attr('width', '95%');
// Define the column widths
// Add or remove columns and adjust widths as necessary but widths should add up to 100%
// NOTE: Columns must be sequentially numbered starting at 0 - eg, td:eq(0), td:eq(1), td:eq(2).....
$( 'div#question1390 table.question tbody th:eq(0)' ).css({ 'width':'50%' }); // Answer text column
$( 'div#question1390 table.question tbody td:eq(0)' ).css({ 'width':'10%' }); // First answer column
$( 'div#question1390 table.question tbody td:eq(1)' ).css({ 'width':'10%' }); // Second answer column
$( 'div#question1390 table.question tbody td:eq(2)' ).css({ 'width':'10%' }); // Third answer column
$( 'div#question1390 table.question tbody td:eq(3)' ).css({ 'width':'10%' }); // Fourth answer column
$( 'div#question1390 table.question tbody td:eq(4)' ).css({ 'width':'10%' }); // Fifth answer column
// Push the text input widths to 95% of their parent containers
$( 'div#question1390 table.question input[type="text"]' ).css({ 'width':'95%' });
// Align the answer text - feel free to experiment
$( 'div#question1390 table.question tbody th' ).css({'text-align':'center'});
});
</script>
Can someone help me why this doesnt work?
A second question: is it possible to freeze the top row so that the subquestions are always visible?
Many thanks
Sabrina