or getDropDown(id).shuffle( "keep selected" )

Shuffles the options that have been added to the DropDown so far. If you call shuffle before settings.add then it will have no effect.

Passing an argument means that you want any option currently selected to remain selected after the shuffle ("keep selected" is simply given as an example—you can pass an arbitrary string).


[js highlight=”3″ try=”true”]newDropDown(“warmth”, “”)
.settings.add(“hot”, “lukewarm”, “cold”)
newText(“Spring in Colorado is  “)
.settings.after( getDropDown(“warmth”) )

Creates a drop-down list containing the options hot, lukewarm and cold, shuffles them, adds the drop-down list to the right of the text Spring in Colorado is and prints everything onto the page, then waits until an option is selected from the drop-down list before proceeding.