开发者

make divs load multiple times on page randomly

let me just give a quick story. I have made a page. (VERY simple - two divs with a different background image, see here.)

Anyway, I need to make it so that when a new page loads, the two divs that I have load in a random order over and over, filling the entire screen content. So there's no pattern of the first div and then the second, it's just randomly generated. Sort of like a huge grid, with the two divs repeated with no pattern.

My question is...is that possible? I assume I'd need to know jQu开发者_Python百科ery, but I have no knowledge of it. Can you please help?

Thanks guys, I appreciate everything!


like this: http://jsfiddle.net/JMPv7/41/?


If you want they side-by-side, i just did it.

Check it here: http://jsfiddle.net/ravan/X3fMC/

How it wors: Get width and heigth of document, then with 2 loops (one for top, other for left) you clone 2 initial divs and append then to the page.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜