Can someone spot the error?

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', () => {
  $('.menu-button').on('mouseenter', () => {
    $('.menu-button').css('color', '#C3FF00');
  $('.nav-menu').on('mouseleave', () => {
    $('.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.

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)

1 Like

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