Shuffle splashpage highlights
(cherry picked from commit 1101c3c9497766a498422ce5c5bfe797a52cf840)
This commit is contained in:
parent
60847e1dae
commit
988803b601
2 changed files with 14 additions and 1 deletions
|
|
@ -31,6 +31,19 @@ $(function () {
|
|||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* Randomize order of parallel elements by shuffling the decks
|
||||
* Adapted from https://stackoverflow.com/questions/7070054
|
||||
*/
|
||||
|
||||
$(document).ready( function() {
|
||||
$.each($(".shuffle-deck"), function(index, deck) {
|
||||
for(var i = deck.children.length; i >= 0; i--) {
|
||||
deck.appendChild(deck.children[Math.random() * i | 0]);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(".select-help-toggle").change(function () {
|
||||
var id = $(this).attr('id');
|
||||
$('.' + id).collapse('hide');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue