alternating background images
This commit is contained in:
8
static/js/background.js
Normal file
8
static/js/background.js
Normal file
@@ -0,0 +1,8 @@
|
||||
var num = (Math.floor(Math.random()*4));
|
||||
|
||||
|
||||
var array = ['one', 'two', 'three', 'four'];
|
||||
|
||||
var elem = document.getElementById('main');
|
||||
|
||||
elem.classList.add(array[num]);
|
||||
Reference in New Issue
Block a user