Dropdown menu refresh problem

It’s only on localhost at the moment, and that is all the code that is involved