- Posts: 31
- Thank you received: 1
Ask the community, share ideas, and connect with other LimeSurvey users!
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ // Create an array of survey titles var surveyTitles = []; $('.surveys-list a.surveytitle').each(function(i) { $(this).attr('data-sid', $(this).attr('href').split('index.php/')[1].split('?')[0]); surveyTitles.push($.trim($(this).text())); }); // Sort the titles surveyTitles.sort(); // Insert the survey links in sorted order $(surveyTitles).each(function(i, val) { var thisLink = $('a.surveytitle').filter(function(e) { return $.trim($(this).text()) == val; }); $('.surveys-list').append(thisLink.closest('li')); }); }); </script>