Hover not submitting


#1




Hi everyone, this code is working fine and does what its suppose to, add/remove class when hover over, however It's throwing error which doesn't make sense:
Oops, try again. It does't look like your background color changed, is your hover adding the class active

$(document).ready(function(){
    $('div').hover(
        function(){
            $(this).addClass('active');
        },
        function(){
            $(this).removeClass('active');
        }
    );
});


#2

I also had the same problem... On what were you ? I was on chrome


#3

yeah I was also on chrome! I found solution by clearing css cache - CTRL + F5 and it worked....


#4

The problem is I am actualy on a chrome book, I'll try on my windows.


#5

I don't think that should be an issue since it's just browser based and should work fine. having text editors is so much better tho and much faster so perhaps its not bad idea getting Windows/Mac/Linux.


#6

The same problem... Clearing cache, did not work for me. Could anyone explain how to resolve this issue in another way?


#7

HI @pablospaniard Its tiny bug on their side, its just the action is too quick and is not being recorded. Go fullscreen and when you hover over elements - keep the mouse on for few seconds before moving to the next element then it works fine! its just takes time to register change of color. I just double checked and it works.. let me know if it doesn't.


#8

Thank you. It helps.


#9

I had the same problem and you answer solved it ! Many thanks !


#10

I am still getting an error msg on this,"Oops, try again. Unable to get property '1' of undefined or null reference" using IE 11. Tried hovering for many sec on each div.


#11

@pacifictinker I got the same error with Edge.

1) I switched to Chrome and got another error:

It does't look like your background color changed, is your hover adding the class active?

2) so I cleared the CSS cache using CTRL + F5 as @deeqoo suggested, and that didn't work.

3) Then I saw that @deeqoo passed on another suggestion to hover over the div for a few seconds, not too quickly. This last suggestion worked in Chrome!


#12

Yep, I got it to work in Firefox too. Seems like a site issue, but this compatibility is part of the baggage with JS. I think I will set up a webserver today and figure out how much of these exercise work as intended on a live site. Thanks!


#13

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.