Firefox sluggish / jittering jquery (or css3?) animation

I had a browser based problem with Firefox yesterday where my animation wasn’t running smoothly, even the latest version, but it was running fine in Chrome and Safari.

I searched online for a bit but didn’t find a solution. I was, at the same time, trying to remove the dotted line that’s displayed when clicking a link in Firefox.

After some trial and error it turne out both things were solved by the same thing.

In css add: