This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Qualtrics.SurveyEngine.addOnload(function() { | |
var input = jQuery("#"+this.questionId+" .InputText"); | |
input.before("$ "); | |
input.after(" /mo"); | |
input.select().focus(); //optional, focus on input field | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<span class="exclusive">Scale Point Label</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Qualtrics.SurveyEngine.addOnload(function() { | |
var listType = "ul"; //use ul for unorderd list, ol for ordered list | |
var q = jQuery(this.questionContainer); | |
q.find(".QuestionBody").hide(); | |
q.find(".QuestionText").append("<"+listType+" class='choiceList'></"+listType+">"); | |
var list = q.find(".choiceList").css("margin-bottom","0px"); | |
q.find("label.SingleAnswer>span").each(function() { list.append("<li>"+this.innerHTML+"</li>"); }); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Qualtrics.SurveyEngine.addOnload(function() { | |
var maxWords = 0; //update as needed, 0=no limit | |
var q = jQuery("#"+this.questionId); | |
var input = q.find(".InputText"); | |
input.after("<div style='font-size:0.8em;float:right'>Word count: <span class='wordCount'>0</span><span class='maxWords'></span></div>"); | |
var display = q.find(".wordCount"); | |
if(maxWords > 0) q.find('.maxWords').text("/"+maxWords); | |
countWords(input.get(0)); | |
input.on("input", function() { countWords(this) }); | |
input.blur(function() { this.value = this.value.trim(); }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Qualtrics.SurveyEngine.addOnload(function() { | |
//Thomas Gibbons Consulting | |
//Change NPS question scale | |
var scaleStart = 1; //Change - 0 or more and no greater than end | |
var scaleEnd = 10; //Change - 10 or less and no less than start | |
//No changes below | |
var width = 100/(scaleEnd - scaleStart + 1) + "%"; | |
var q = jQuery("#"+this.questionId); | |
var cc = q.find('td.ControlContainer'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
.Skin .Matrix table tr.ChoiceRow td { | |
display:block;text-align:left;padding:5px 2px;border-left:1px solid #666;border-right:1px solid #666; } | |
.Skin .Matrix table th.c1 { border-left:1px solid #666;border-bottom:1px solid #666; } | |
.Skin .Matrix table tr.ChoiceRow td:last-of-type { border-bottom:1px solid #666; } | |
.Skin .Matrix table tr.ChoiceRow:first-of-type th, | |
.Skin .Matrix table tr.ChoiceRow:first-of-type td:first-of-type { border-top:1px solid #666; } | |
.JFEScope .Skin .desktop .mobile { display: inline!important; } | |
tr.Answers { display:none; } | |
.JFEScope .Skin .desktop .mobile.dropdown-arrow { display:none!important; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Qualtrics.SurveyEngine.addOnload(function() { | |
var inputWidth = "75px"; | |
var q = jQuery("#"+this.questionId); | |
q.find('.SumInput').css("width", inputWidth); | |
q.find('.SumTotal').css("width", inputWidth); | |
q.find('.InputText').css("width", inputWidth); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://cdn.jsdelivr.net/npm/luxon@3.4/build/global/luxon.min.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.LanguageSelectorContainer, span.langCode { display:none; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Qualtrics.SurveyEngine.addOnload(function() { | |
console.log(Array.from({length: 20}, (e, i) => i)); | |
}); | |
// Production steps of ECMA-262, Edition 6, 22.1.2.1 | |
// Copied and modified from http://www.devdoc.net/web/developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from.html | |
Array.from = (function () { | |
var toStr = Object.prototype.toString; | |
var isCallable = function (fn) { | |
return typeof fn === 'function' || toStr.call(fn) === '[object Function]'; |
NewerOlder