You're referring to `$("#event-timeline")` many times, consider moving the selector on the top of the file.