Okay I've fixed it. I'm not entirely sure how, but it's done! As I had yet to replace the given code in the index.php of the theme I am using, I continued to do so while I waited for a response on this question. Magically, once the rest of my page code was loaded, the hover function worked completely.
I can only assume that this was either a collapsing issue that the .group
class hadn't resolved without the remaining page code, or possibly a clash of z-index
items.
Apologies for not providing more information, but it could potentially take quite some time to track down the specific cause of the issue. My advice from this would be to fill in all the html and css before worrying about getting the JS working!