https://www.qualtrics.com/community/discussion/comment/15160#Comment_15160Hi Tom!
Is there an easy way to modify this for single answer multiple choice? I think it might only be applicable to matrix style questions.
Thanks!
Adam
Is there an easy way to modify this for single answer multiple choice? I think it might only be applicable to matrix style questions.
Yes, the previous link is only applicable to Matrix questions.
A different link for horizontal MC: https://gist.github.com/marketinview/85c2c5717354827fc9d6b7997b114710
Amazing Tom! Thanks so much! I am continually astounded by the adept JavaScript skills.
Hi
I have been trying to get this to work but it does not. The columns are the same afterwards? The first question is having its class changed to "last" and the last column is having its class "last" removed.
But it still renders 1 to 7 not 7 to 1?
https://community.qualtrics.com/XMcommunity/discussion/comment/48569#Comment_48569Columns? A mobile matrix (aka accordion) doesn't have columns. The script only works on the accordion layout and leaves the desktop layout as-is.
Is there anyway to reverse the "Very Bad" to "Very Good" columns in the Matrix table below
We need this for the Hebrew language?
https://community.qualtrics.com/XMcommunity/discussion/comment/48572#Comment_48572Are you saying you want to flip the scale when the language is Hebrew, but otherwise leave it as is? If so, you can write JS to do that.
I have the code running and the mobile does not get detected?
if (jQuery("#"+this.questionId+".QuestionBody.mobile").length > 0)
This always has a length of zero?
https://community.qualtrics.com/XMcommunity/discussion/comment/48575#Comment_48575Hi Tom, how can I write the JS to do that, I am new to Qualtrics but have 20 years JavaScript?
We would like this for all devices?
Pipe ${e://Field/Q_Language} into your JS to get the current language. Flip the order of the answer cells in each row. The table layout differs a bit between mobile and non-mobile, so you'll have to account for that. If the QuestionBody div has the class "mobile" if it is mobile.
Hi
This is my reversing code and there are no errors, but completley messes up the whole layout and duplicates the question?
Qualtrics.SurveyEngine.addOnReady(function()
{
var tbody = jQuery('.ChoiceStructure');
alert('tbody ' + tbody);
tbody.html(jQuery('tr',tbody).get().reverse());
In Qualtrics $ is prototypejs, so you searched for an element with the id of 'table'.
If you want to use jQuery, use
jQuery('table'). However, in general, you should restrict searches to the current question, which would be
jQuery("#"+this.questionId+" table").
Hi, will try that thanks TomG!
It has changed all the questions!
Hi Tom
All the above works, we now have 1 to 7 from left to right when in Hebrew, column headings change over which is great thank you.
But the values do not, so column 7 gives a value of 1 and column 1 gives a value of 7!
These values must be stored somewhere and also need reversing?
https://community.qualtrics.com/XMcommunity/discussion/comment/48667#Comment_48667That means your JS doesn't flip the answer cells in the rows.
Hi
Do I need a different code for carousel?
Please note that I’m also using the custom CSS for carousel box. Not sure if that’s interfering with anything.
Hi
Do I need a different code for carousel?
Please note that I’m also using the custom CSS for carousel box. Not sure if that’s interfering with anything.
Yes, you need different code for a carousel.
CSS only impacts the formatting, not the order. So it unrelated.
Hi
Do I need a different code for carousel?
Please note that I’m also using the custom CSS for carousel box. Not sure if that’s interfering with anything.
Yes, you need different code for a carousel.
CSS only impacts the formatting, not the order. So it unrelated.
Thank you
Thank you
I haven’t created it.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.