Skip to content

Instantly share code, notes, and snippets.

@marketinview
Last active January 13, 2023 17:59

Revisions

  1. marketinview revised this gist Nov 10, 2021. 2 changed files with 0 additions and 0 deletions.
  2. marketinview revised this gist Nov 10, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion convertPipedTextToBullets.js
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    Qualtrics.SurveyEngine.addOnload(function() {
    var bullets = jQuery("#"+this.questionId+" .bullets");
    var ul = bullets.hide().after("<ul></ul>").next();
    jQuery.each(bullets.text().split(", "), function(i,val) { ul.append("<li>"+val+"</li>"); });
    jQuery.each(bullets.html().split(", "), function(i,val) { ul.append("<li>"+val+"</li>"); });
    });
  3. marketinview revised this gist Nov 10, 2021. No changes.
  4. marketinview revised this gist Nov 10, 2021. 1 changed file with 2 additions and 3 deletions.
    5 changes: 2 additions & 3 deletions convertPipedTextToBullets.js
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,5 @@
    Qualtrics.SurveyEngine.addOnload(function() {
    var bullets = jQuery("#"+this.questionId+" .bullets");
    var items = bullets.text().split(", ");
    var ul = bullets.html("<ul></ul>").find("ul");
    jQuery.each(items, function(i,val) { ul.append("<li>"+val+"</li>"); });
    var ul = bullets.hide().after("<ul></ul>").next();
    jQuery.each(bullets.text().split(", "), function(i,val) { ul.append("<li>"+val+"</li>"); });
    });
  5. marketinview created this gist Nov 9, 2021.
    1 change: 1 addition & 0 deletions convertPipedTextToBullets.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    Show a bulleted list here: <div class="bullets">${q://QID84/ChoiceGroup/SelectedChoices}</div>
    6 changes: 6 additions & 0 deletions convertPipedTextToBullets.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    Qualtrics.SurveyEngine.addOnload(function() {
    var bullets = jQuery("#"+this.questionId+" .bullets");
    var items = bullets.text().split(", ");
    var ul = bullets.html("<ul></ul>").find("ul");
    jQuery.each(items, function(i,val) { ul.append("<li>"+val+"</li>"); });
    });