Guest User

Untitled

a guest
Nov 2nd, 2019
113
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <head>
  2. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
  3. <script>
  4. $(document).ready(function(){
  5.  
  6. $("#7").click(function(){
  7. $("#7").addClass("bg");
  8. setTimeout(function(){
  9. $("#7").removeClass("bg");
  10. }, 2000);
  11. });
  12.  
  13.  
  14. $("#8").click(function(){
  15. $("#8").addClass("bg");
  16. setTimeout(function(){
  17. $("#8").removeClass("bg");
  18. }, 2000);
  19. });
  20.  
  21. });
  22.  
  23. </script>
  24. </head>
  25.  
  26. <body>
  27.  
  28. <div id="7">7</div>
  29. <div id="8">8</div>
  30.  
  31. <style>
  32. div{
  33. border-radius: 30%;
  34. border: 1px solid black ;
  35. width: 100px;
  36. background: red;
  37. }
  38. .bg{
  39. background: blue;
  40. }
  41. </style>
  42. </body>
RAW Paste Data