Oh sorry. My bad. I entered the JavaScript code in the CSS section instead of the JavaScript section.
Now it works like a charm.