From http://stackoverflow.com/questions/7373023/throttle-event-calls-in-jquery