Advertisement
Guest User

Untitled

a guest
Jan 15th, 2015
524
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //2. Write your JS here
  2. $('.wants-to-be-blue').blue()
  3.  
  4. //3. Write your JS here
  5. $(document.getElementsByTagName('li')[3]).blue();
  6.  
  7. //4. Write your JS here
  8. $("#make-me-blue").blue();
  9. $(document.getElementsByTagName('div')[2]).blue();
  10. $(document.getElementsByTagName('span')[0]).blue();
  11. $(document.getElementsByTagName('i')[1]).blue();
  12. $(document.getElementsByTagName('div')[5]).blue();
  13.  
  14. //5. Write your JS here
  15. // Write your JS here
  16. var divs = document.getElementsByTagName('div'),
  17.     blue_count = 1,
  18.     blue_target = divs.length + 1;
  19.    
  20. MakeBlueDivs();
  21.    
  22. function MakeBlueDivs(){
  23.     for(var i=0;i<divs.length;i++){
  24.         if(divs[i].innerHTML == (blue_count + "")){
  25.             $(divs[i]).blue();
  26.             blue_count ++;
  27.             continue;
  28.         }
  29.     }
  30.    
  31.     if(blue_count < blue_target){
  32.         MakeBlueDivs();
  33.     }
  34. }
  35.  
  36. //6. Write your JS here
  37. // Write your JS here
  38. var divs = document.getElementsByTagName('div');
  39.  
  40. for(var i=0;i<divs.length;i++){
  41.     if(divs[i].className != 'bomb'){
  42.         $(divs[i]).blue();
  43.     }
  44. }
  45.  
  46. //7. Write your JS here
  47. setTimeout(function(){
  48.     $('div').blue();
  49. }, 1001);
  50.  
  51. //8. Speed is everything
  52. $('button').click();
  53. $('div').blue();
  54.  
  55. //9. Write your JS here
  56. var dir = document.getElementById('map');
  57. var ids = dir.innerHTML.split(' ');
  58.  
  59. for(var i=0;i<ids.length;i++){
  60.     $(document.getElementById(ids[i])).blue();
  61. }
  62.  
  63. //10. Write your JS here
  64. function SetBlue(){
  65.     var divs = document.getElementsByTagName('div');
  66.    
  67.     for(var i=0;i<divs.length;i++){
  68.         if(divs[i].className != 'bomb'){
  69.             $(divs[i]).blue();
  70.         }
  71.     }
  72. }
  73.  
  74. setInterval(SetBlue, 100);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement