Fix jQuery Firefox refresh bug

- See http://stackoverflow.com/questions/25648944/jquery-works-
  immediately-in-chrome-but-requires-page-refresh-in-firefox