window.onload = function() {
  window.setTimeout(fadein, 1000); //2 seconds
}
$( document ).on( "mousemove", function( event ) {
$( "#log" ).text( "pageX: " + event.pageX + ", pageY: " + event.pageY );
 var x = event.pageX; 
 if (x > 1200) {
    function fadein() {
      document.getElementById('fadein').style.opacity = '0';
    }
 }
});
I just want the text to fade after the mouse x coordinate reaches a certain point. JavaScript throws no error, am I missing any syntax or do I lack a fundamental understanding of how I should go about this process?
Some quick FAQ I might expect:
Yes, I have JQuery loaded
Yes, the HTML/CSS is all consistent in naming.
 
     
     
    