Why are you setting display to an empty string before setting it to 'none'?