$('.btn').click(function() {
$(this).remove();
});
However, as systems became larger and more complex people realized that...

"Design Patterns" → Object-oriented programming
"Structured Design" → Structured programming

loop do
# wait for user input
input = gets.chomp
if input == "1"
# do whatever pressing "1" does
elsif input == "k"
# do whatever pressing "k" does
elsif input == "q"
# clean-up and exit application
else
# raise exception for unhandled event type or ignore
end
end
Yeah, that's right, pretty much everyone has written a transaction center

Shoes.app(title: "See this? It's a shoes app") do # make GUI things in here # P.S... nobody knows shoes end

http://www.dre.vanderbilt.edu/~schmidt/PDF/reactor-siemens.pdf
http://www.cs.vu.nl/~eliens/online/oo/I/2/events.html
http://www.slideshare.net/autonomous/ruby-concurrency-and-eventmachine
http://en.wikipedia.org/wiki/Event-driven_programming
http://iweb.dl.sourceforge.net/project/eventdrivenpgm/ event_driven_programming.pdf