jQuery intro - code not updating the browser window

Hello, I’ve just started the jquery course. I can’t understand why my code isn’t updating the browser window. I’ve gone through it a couple of times and also watched the video. I don’t see any difference between what I’ve done and what is demonstrated in the video but when I click the dropdown menus, they don’t dropdown etc. Can anyone see what I’m doing wrong?

$(document).ready(() = {
  $('#cart').on('click', () => {
    $('#cartMenu').show
  });
    $('#account').on('click', () => {
    $('#accountMenu').show
  });
  $('#help').on('click', () => {
    $('#helpMenu').show
  });
  $('.dropdown-menu').on('mouseleave', () => {
    $('.dropdown-menu').hide()
  })
})

Does that seem right?

Is this meant to call a show() method?

Ahhh thank you! I was missing => after ready and also () after show. I’m always amazed that I can’t spot these things :flushed:

1 Like