Adds javascript code for autocomplete into nav partial (not working)