A JavaScript implementation of image flipping code

From , 3 Years ago, written in JavaScript, viewed 52 times.
URL https://pastebin.vip/view/1963bd51
  1. <script type="text/javascript">
  2. var revert = new Array();
  3. var inames = new Array('smirk');
  4.  
  5. // Preload
  6. if (document.images) {
  7.   var flipped = new Array();
  8.   for(i=0; i< inames.length; i++) {
  9.     flipped[i] = new Image();
  10.     flipped[i].src = ""+inames[i]+"2.JPG";
  11.   }
  12. }
  13.  
  14. function over(num) {
  15.   if(document.images) {
  16.     revert[num] = document.images[inames[num]].src;
  17.     document.images[inames[num]].src = flipped[num].src;
  18.   }
  19. }
  20. function out(num) {
  21.   if(docu <script type="text/javascript">
  22. var revert = new Array();
  23. var inames = new Array('smirk');
  24.  
  25. // Preload
  26. if (document.images) {
  27.   var flipped = new Array();
  28.   for(i=0; i< inames.length; i++) {
  29.     flipped[i] = new Image();
  30.     flipped[i].src = ""+inames[i]+"2.JPG";
  31.   }
  32. }
  33.  
  34. function over(num) {
  35.   if(document.images) {
  36.     revert[num] = document.images[inames[num]].src;
  37.     document.images[inames[num]].src = flipped[num].src;
  38.   }
  39. }
  40. function out(num) {
  41.   if(document.images) document.images[inames[num]].src = revert[num];
  42. }
  43. </script>
  44. //javascript/6190

Reply to "A JavaScript implementation of image flipping code"

Here you can reply to the paste above

captcha

https://burned.cc - Burn After Reading Website