console.timeEnd("") reference for an if Function (Javascript)
<p><b>How the current version of my code works:</b></p>

<p>When a user's mouse pointer hovers a Nav element the background image of the website fades to a smaller less opaque version. 
When the mouse leaves the nav Element it returns to the previous image.</p>

<p>The code for this looks like this:</p>

<pre><code>$(document).ready(function(){
  $("li a").mouseenter(function(){
    $('.image').fadeTo(100, 0.5, function() {
    $(".image").css("background","url(images/backdrop_smaller.png)");
    });
  });
$("li a").mouseout(function(){
    $('.image').fadeTo(100, 1.0, function() {
    $(".image").css("background","url(images/backdrop_orig.png)");
  });
  });
}); 
</code></pre>

<p>The only problem with this is that if the user rapidly moves in between Nav elements the image rapidly shifts (which looks disorienting) and eventually lags behind the users command (due to the .fadeTo interval).</p>

<p>So as to prevent this I thought I would set up a console timer to print the time when the User leaves a nav element and enters another. Then create an if function to dictate whether or not the first mouseout transition plays to completion.</p>

<p>The timer looks like this:</p>

<pre><code>$(document).ready(function(){
  $("li a").mouseout(function(){
    console.time("time")
});
});

  var FunctionEndTime = $(document).ready(function(){
  $("li a").mouseenter(function(){
    var end = console.timeEnd("time")
});
});
</code></pre>

<p>My problem lies in referencing this printed console time in the if function and then also preventing the fade triggered by .mouseout from playing to completion. For example, if the the time difference was less than the fade time (100ms) the fade would stop transitioning. This would leave the smaller less opaque background image and prevent disorienting image flicker and</p>

<p>Here is what my not working code looks like:</p>

<pre><code>function TimeReset() {
  if (end &lt; 25)
  {
    $(document).ready(function(){
  $("li a").mouseout(function(){
     $('.image').fadeTo(100, 0.5, function() {
    $(".image").css("background","url(images/backdrop_smaller.png)");
      });
  });
});
}
</code></pre>

<p>The code above obviously does not do what I would like and is referencing things incorrectly. I just am not sure how to do it properly. </p>

<p>The question is: am I thinking about this all incorrectly? or do I just not know how to implement the code to completion?</p>
