No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
ul.appendChild(ul.children[Math.random() * i | 0]); | ul.appendChild(ul.children[Math.random() * i | 0]); | ||
} | } | ||
</script> | |||
</html> | |||
<html> | |||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> | |||
<script> | |||
$("li").each( function() { | |||
var rNum = (Math.random()*6)-3; | |||
$(this).css( { | |||
'-webkit-transform': 'rotate('+rNum+'6deg)', | |||
'-moz-transform': 'rotate('+rNum+'6deg)', | |||
'transform': 'rotate('+rNum+'6deg)' | |||
} ); | |||
} ); | |||
</script> | </script> | ||
</html> | </html> |