Hi,
I want to add a horizontal line divider to a Grouped list. However, I only want it to apply to the LAST item of the whole list, not each group.
In current state, when I apply this code, it applies a line above the last choice of each group:
However, I want only one line above the end of this list (where the red line is located):
MaggieGentry
If you are aware of the QID you can change QID within JavaScript to show on just last element.
Qualtrics.SurveyEngine.addOnload(function()
{
jQuery('#QID65-7-label').css({"border-top":"2px solid","margin-top":"10px"});
});
Hope this helps!
Added the above Javascript to the question, and it added a line at the TOP of the question:
Here is what I programmed at the question level:
{
jQuery('#QID30001').css({"border-top":"2px solid","margin-top":"10px"});
}
I want the line here:
MaggieGentry
You need to add the QID of the none of these option and not question id.
You can get that by inspect feature of browser.
Hope it helps
maggie
MaggieGentry ,
Use this:
Qualtrics.SurveyEngine.addOnload(function() {
jQuery("#"+this.questionId+" li.Selection").last().css({"border-top":"2px solid #aaa","padding-top":"10px"});
});
Qualtrics.SurveyEngine.addOnload(function() {
jQuery("#"+this.questionId+" li.Selection").last().css({"border-top":"2px solid #aaa","padding-top":"10px"});
});
For this code - what if I wanted a line, not last of type - but 2 above last of type?
This is a new/related question.
https://community.qualtrics.com/XMcommunity/discussion/comment/50758#Comment_50758Use
.last().prev().prev()
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.