Putting the js inside ready function