Last active
          June 9, 2017 04:30 
        
      - 
      
- 
        Save 4noha/6bb4dbfe7d2a0c4ea2839f5fa53f0741 to your computer and use it in GitHub Desktop. 
    コンフルのHTMLブロックプラギンに入れるとヘッダがスクロールイベントにに反応してパリピ仕様になる
  
        
  
    
      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 type="text/javascript"> | |
| $(function(){ | |
| $(window).scroll(function () { | |
| // 16777216 = 0xFFFFFF + 1 | |
| var rgb = Math.floor( Math.random() * 16777216 ).toString( 16 ); | |
| zerofill = 6 - rgb.length; | |
| for ( ; zerofill > 0; zerofill-- ) { | |
| rgb = '0' + rgb; | |
| } | |
| $( '#header' ).children( 'nav' ).css({ 'background-color': '#' + rgb }); | |
| // 変色スピード1/2 | |
| angle = Math.floor( window.pageYOffset / 2 ) % 360; | |
| $('#quick-create-page-button').css({ 'background-color': 'hsl(' + angle + ',100%,60%)' }); | |
| $( '#create-page-button' ).css({ 'background-color': 'hsl(' + angle + ',100%,60%)' }); | |
| }); | |
| }); | |
| </script> | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment