Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let time = 5000;
- let clicked = 1;
- $(document).on('click', '#container div',function() {
- time += 1000;
- generateBox();
- });
- function generateBox() {
- let top = Math.floor(Math.random() * 551);
- let left = Math.floor(Math.random() * 911);
- $('#container').html('<div style="top: '+top+'px; left: '+left+'px;">'+clicked+'</div>');
- clicked++;
- }
- /*document.addEventListener('keyup', (event) => {
- console.log(String.fromCharCode(event.keyCode));
- });*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement