I would suggest to put this into the style sheet and not into the JS code