Created
May 29, 2015 12:41
-
-
Save tomayac/0788c9fdd5d391cd4d17 to your computer and use it in GitHub Desktop.
Highlights a lucky random attendant who RSVP'ed to a meetup organized via www.meetup.com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Test at http://www.meetup.com/Google-Developer-Group-Hamburg/events/222392017/ | |
document.querySelector('#rsvp-list').querySelectorAll('li') | |
[ | |
Math.floor( | |
Math.random() * | |
document.querySelector('#rsvp-list').querySelectorAll('li').length | |
) + 1 | |
].style.backgroundColor = | |
'rgb(' + | |
(Math.floor(Math.random() * 256)) + ',' + | |
(Math.floor(Math.random() * 256)) + ',' + | |
(Math.floor(Math.random() * 256)) + ')'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Paste in the browser console and draw your lucky winner :-)