mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-04-21 12:11:52 +02:00
15 lines
477 B
JavaScript
15 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 );
|
||
|
}
|