My code is right but Codecademy tells me otherwise

<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>

Hi,

My code works but an error message pops up and stops me at this exercice.
Thank you for your help.

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/courses/web-beginner-en-JwhI1/1/2?curriculum_id=50a3fad8c7a770b5fd0007a1

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>



$(document).ready(function(){

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

});


after clicking on the save and submit button please follow the instructions next to back to editor button.

Thank you very much!!!

I have the same problem but after following the instructions i get “Could not get the property “1” of a link whose value is not defined or is NULL”

can you please create a new topic?

read this it’ll help you to make a good topic :slight_smile:

1 Like

If your code is working correctly when hover over the button it does change the color then hold on the cursor on the buttons for 4-5 seconds and the hover over the next, it takes some time to register the change in color.

1 Like

it does work for me,thanks.

Same here, I have the exact same code, and I’m sure it’s correct. In fact, it works just fine when I submit. I have no clue what’s wrong with it.

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