Fade out mouse cursor when inactive with jQuery - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:mouseout

Description

Fade out mouse cursor when inactive with jQuery

Demo Code

ResultView the demo in separate window


<html>
   <head> 
      <script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> 
      <style>

.hideCursor {/*  w w  w . j  a va2s. co  m*/
   cursor: none;
   content: 'cursor hidden';
}

      </style> 
   </head> 
   <body> 
      <script>
$(function() {
  var $body = $('html');
  setInterval(function() {
    $body.toggleClass("hideCursor");
  }, 500);
});

      </script>  
   </body>
</html>

Related Tutorials