BrU32

Untitled

Jul 7th, 2016
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
  2. <script>
  3. $(document).ready(function(){
  4. $("body").mousemove(function(){
  5. var op=(Math.random()*1);
  6. $("body").fadeTo("."+op,parseFloat(op));
  7. if(op=1){
  8. $('body').css('background','green');
  9. return;
  10. }
  11. if(op=0){
  12. $('body').css('background','red');
  13. return;
  14. }
  15. });
  16. });
  17. </script>
  18.  
  19. <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
  20. <script>
  21. $(document).ready(function(){
  22. $("*").mousemove(function(){
  23. var op=(Math.random()*1.0);
  24. $("*").fadeTo("."+op,parseFloat(op));
  25. return;
  26. if(op!=1.0){
  27. $('*').css('color','green');
  28. return;
  29. }
  30. });
  31. });
  32. });
  33. </script>
  34.  
  35. <body>
  36. <button>HTML DOC Fade To Random Opacity Endless Loop Effect SRC</button><br><br>
  37. <div id="div1" style="width:80px;height:80px;background-color:red;"></div><br>
  38. </html>
  39. </body>
Advertisement
Add Comment
Please, Sign In to add comment