mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-04-21 01:41:54 +02:00
14 lines
477 B
JavaScript
14 lines
477 B
JavaScript
function appendRandomSizedItems( container ) {
|
|
var frag = document.createDocumentFragment();
|
|
for ( var i=0; i < 35; i++ ) {
|
|
var item = document.createElement('div');
|
|
item.className = 'item';
|
|
var w = Math.floor( Math.random() * Math.random() * 180 ) + 20;
|
|
var h = Math.floor( Math.random() * Math.random() * 180 ) + 20;
|
|
item.style.width = w + 'px';
|
|
item.style.height = h + 'px';
|
|
frag.appendChild( item );
|
|
}
|
|
|
|
container.appendChild( frag );
|
|
}
|