Created
May 6, 2015 03:24
-
-
Save jjulian/6b95ef6d15a33293c38a to your computer and use it in GitHub Desktop.
Random draw from meetup page RSVPs
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
// Go to http://www.meetup.com/charmcityjs/events/221660971/ | |
// Open JS console | |
// Paste this code | |
var attendees = $.makeArray($('#rsvp-list li.memberinfo-widget .member-name > a')); var winner = attendees[Math.floor(Math.random()*attendees.length)]; $('body').prepend('<br>').prepend(winner); | |
// Describe how it works: find all RSVP links, choose one at random using js and array, prepend the html to top of page | |
// Run it a few times to prove randomness | |
// Run it one last time to draw a winner | |
// Open the winner's profile link in a new tab, view full bio and avatar | |
// Ask them to come formward! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A simple, online way to draw a winner from a meetup page