+ 4
In web designing, how to shuffle the options in a list, like Sololearn does with its questions?
3 odpowiedzi
+ 14
Check out for math.floor( math.random(...) ...) under JS. Btw here's another link which may help you. https://codereview.stackexchange.com/questions/138592/displaying-random-elements-for-a-quiz-app 😊👍
+ 3
You would need to use javascript to randomise html elements. Check here for a simple example: https://www.htmllion.com/shuffle-list-items.html
+ 2
Check this code:
https://code.sololearn.com/WM7RNUsUmLc4/#js
It shuffle direct childs of any element query selector (use css query selector syntax to select one or more parent element, and shuffle its direct childs -- no deep shuffle, which can be done recursively ;P)