Can you access the position of an element in the randomizer | XM Community
Skip to main content
Dear all,



we have the challenge that we need to present 3 questions in a randomized order. The question texts are dependent on the position of the question.



The idea is to have the question text variable and set it according to the position.



Therefore it would be helpful to know if we can get the position information during the run time



Thanks for your help



Best regards Rudi
You could do something like:

```

var qids = [];

jQuery(".QuestionOuter").each(function() { qids.push(this.id) });

```

The qids array will contain the question ids in their randomized order, and you can use it to modify your questions as needed.
Thank you Tom, very helpful

Leave a Reply