- Posts: 3
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { var qText = 18a; var qArray = 18b; // Fix the width of the survey $( 'table.outerframe' ).css({'width': '900px'}); // Wrap the 2 questions in a container div and style it $('#question'+qText+', #question'+qArray+'').wrapAll('<div class="inlineWrapper" />'); $('.inlineWrapper').append('<div style="clear:both" />'); $('.inlineWrapper').css({ 'width': '75%', 'margin':'0 auto 10px auto', 'background-color':'#FFFFFF' }); $('.inlineWrapper *').css({ 'padding': '0', 'margin':'0' }); // Hide the question and the help text $('#question'+qText+' td.questiontext, #question'+qArray+' td.questiontext').parent().hide(); $('#question'+qText+' > table:eq(1), #question'+qArray+' > table:eq(1)').hide(); $('#question'+qText+' td.survey-question-help, #question'+qArray+' td.survey-question-help').parent().hide(); //Hide the answer cell of the array $('#question'+qArray+' table.question thead tr').children(":first").hide(); $('#question'+qArray+' table.question tbody tr').children(":first").hide(); $('#question'+qArray+' col').attr('width', ''); // Push all question tables to 100% $('#question'+qText+' table, #question'+qArray+' table').css({'width': '100%'}); // Get the 2 questions to sit politely side by side $('#question'+qText+', #question'+qArray+'').css({'float':'left'}); $('#question'+qText+'').css({'padding':'15px 0 5px 25px'}); $('#question'+qText+'').css({'padding-top':'27px'}); // Adjust here for wrapped array labels $('#question'+qArray+'').css({'padding':'5px 0 10px 0'}); $('#question'+qArray+' table.question td').css({'padding':'4px'}); $('#question'+qText+' table:first').attr('align', 'left'); $('#question'+qText+' label').css({ 'display':'inline', 'width':'auto', 'margin-right':'10px' }); // Set the widths of the 2 questions $('#question'+qText+'').css({'width': '35%'}); $('#question'+qArray+'').css({'width': '58%'}); }); </script>