I\'m having a hard time understanding the order in which javascript loads on a page. Here is what I am trying to do.