- Posts: 12
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
<script type="text/javascript" data-author="Tony Partner"> $(document).on('ready pjax:scriptcomplete',function(){ // The column to receive the sliders var sliderColumn = 3; var thisQuestion = $('#question{QID}'); var nextQuestion = thisQuestion.nextAll('.numeric-multi:eq(0)'); // Hide the next question nextQuestion.hide(); //Remove the core array text inputs $('tr[id^="javatbd"] .answer-item:nth-child('+(sliderColumn+1)+') input', thisQuestion).remove(); // Wait for the sliders to be inititialized $('input:text', nextQuestion).on('slideEnabled',function(){ var thisItem = $(this).closest('li'); var thisItemIndex = thisItem.index(); // Move the slider and add some styling $('tr[id^="javatbd"]:eq('+thisItemIndex+') .answer-item:nth-child('+(sliderColumn+1)+')', thisQuestion).append($('.slider-container', thisItem)); $('tr[id^="javatbd"]:eq('+thisItemIndex+') .slider-container', thisQuestion) .removeClass('col-xs-12 col-sm-12') .css({ 'display': 'block', 'padding': '25px 10px 0 10px' }); }); }); </script>
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
<link href="/upload/surveys/{SID}/files/jquery-ui.css" rel="stylesheet" /> <script src="/upload/surveys/{SID}/files/jquery-ui.js"></script> <script src="/upload/surveys/{SID}/files/jquery.csv.min.js"></script> <script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:complete',function() { // Hier wird der Speicherort der Datei angegeben var url = "/upload/surveys/{SID}/files/names.csv"; var Names = new Array(); $.get(url,function(data){ fullArray = $.csv.toArrays(data); $(fullArray).each(function(i, item){ Names.push(item[0]); }); $('#question{QID} .answer_cell_X001 input[type="text"]').autocomplete({ minLength: 2, source: Names }); }); }); </script>
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.