Help me, please!

I don’t know how to fix this error.
Below is my code:

$(document).ready(function() {
  console.log("index.js is ready");
});
$(window).resize(function() {
  document.getElementById("debug").innerHTML = "my current window width is ";
  $(window).width();
});
$(document).mousemove(function() {
  if ($(window.width() - event.pageX < 200) {
    $(".menu").css("right", "0");
  } else {
    $(".menu").css("right", "-400px");
  })
};

What is the lesson No. and/or what should be the intended result?