I have two questions :
- First : Why using $(this).hover instead of $('div').hover doesn't work ? From what I understand, you're basically saying IF you are hovering the element below your mouse cursor => addClass to this element.
- Second : If you translate the correct code you're telling to addClass to the element below your mouse IF you're hovering any div element. So for example if you're hovering the "HOME" div, it'll add the class="active". No issue there.
But I don't really understand the removeClass part. If you're using the same reasoning, you're also saying to removeClass when hovering this element.
I personnally thought using toggleClass makes more sense.
(I hope I was clear)