I am trying to use this fiddle http://jsfiddle.net/C6LPY/2/
$(function () {
var parent = $("#shuffle");
var divs = parent.children();
while (divs.length) {
parent.append(divs.splice(Math.floor(Math.random() * divs.length), 1)[0]);
}
});
On my site here:
https://github.com/craiglockwood/confheroes/blob/master/index.html but am getting a 'can't find variable' error.
The idea is to shuffle the divs in random order each time the page loads. The fiddle works but somehow, not with my code.
Any help greatly appreciated.