View this on Chrome 39+ on Android with at least Lollipop
          Created
          February 13, 2016 02:33 
        
      - 
      
- 
        Save anonymous/3c308c47c14f8d084055 to your computer and use it in GitHub Desktop. 
    Spread the Rainbow
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <h4>Only works on Chrome 39+ on Android Lollipop+</h4> | |
| <button type="button" class="btn change-theme">Spread the rainbow</button> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | $(".change-theme, body").on("click", function() { | |
| var colour = '#' + Math.floor(Math.random() * 16777215).toString(16); | |
| $("#themeColour").attr('content', colour); | |
| $(".change-theme").css("color", colour) | |
| }); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | html, | |
| body { | |
| background-color: #cccccc; | |
| padding: 0; | |
| margin: 0; | |
| color: #000; | |
| font-family: 'Open Sans', sans-serif; | |
| text-align: center; | |
| height: 100%; | |
| position: relative; | |
| overflow: hidden; | |
| cursor: pointer; | |
| -webkit-tap-highlight-color: rgba(255, 255, 255, 0); | |
| } | |
| h4{ | |
| line-height: 1em; | |
| font-weight: 100; | |
| font-size: 1rem; | |
| padding-left: 20px; | |
| padding-right: 20px; | |
| text-transform: uppercase; | |
| } | |
| .btn { | |
| display: inline-block; | |
| font-weight: 400; | |
| text-align: center; | |
| white-space: nowrap; | |
| vertical-align: middle; | |
| cursor: pointer; | |
| -webkit-user-select: none; | |
| -moz-user-select: none; | |
| -ms-user-select: none; | |
| user-select: none; | |
| border: 1px solid transparent; | |
| color: #000000; | |
| background-color: transparent; | |
| background-image: none; | |
| border-color: inherit; | |
| padding: .75rem 1.25rem; | |
| font-size: 1.5rem; | |
| line-height: 1.333333; | |
| border-radius: .3rem; | |
| margin-top: 5rem; | |
| } | |
| .btn:active, | |
| .btn:hover, | |
| .btn:focus{ | |
| outline:none; | |
| text-decoration: none; | |
| color: inherit; | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment