Can someone spot the error?


#1

Chapter : 4.3

Error message: Did you use the css method to change th color of .menu-button to #C3FF00?
So not helpful at all, hehe.

$(document).ready(() => {
 
  $('.login-button').on('click', () => {
    $('.login-form').toggle();
  });
  
  $('.menu-button').on('mouseenter', () => {
    $('.nav-menu').show();
    $('.menu-button').css('color', '#C3FF00');
  });
  
  $('.nav-menu').on('mouseleave', () => {
    $('.nav-menu').hide();
    $('.menu-button').css('color', '#EFEFEF');
  });
});


The code fails the first objective.
Is this a bug or am I just blind because I can’t see what’s invalid about my code.


#2

If I’m reading things right, it’s looking for code producing a syntax tree equivalent to:

$($menuButton).on($mouseenter, () => {
  $($menuButton).css($color, $hex)
});

You’ve got an extra line in there, so perhaps without that, it’ll match.

(Ignore all the extra $'s and different names)


#3

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