Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <ul id="index">
  <li rel="2014" class="active">2014</li>
  <li rel="2013">2013</li>
  <li rel="2012">2012</li>
  <li rel="2011">2011</li>
  <li rel="2010">2010</li>
</ul>
<ul id="content">
  <li id="2014">
    <table>
      <tr>
        <td>
          Jan 13
        </td>
        <td>
          Ut sed porta augue. Sed molestie elementum lorem ut fermentum. Quisque in mi eget sapien pulvinar iaculis ut vel dolor. Duis dignissim ullamcorper mi, id facilisis magna consectetur quis.
        </td>
      </tr>
      <tr>
        <td>Jan 28</td>
        <td>
	        Proin ornare viverra elit. Etiam commodo tincidunt rutrum. Aenean at pretium ipsum, quis interdum quam. Cras ut ultricies arcu, vestibulum fringilla ipsum. Quisque tempus ac turpis et rhoncus. Vivamus congue.
        </td>
      </tr>
      <tr>
        <td>Feb 12</td>
        <td>
	        Proin tellus ipsum, tempor at vehicula quis, volutpat ut felis. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Etiam lacus nulla, tincidunt id nunc at.
        </td>
      </tr>
      <tr>
        <td>Feb 25</td>
        <td>
	        Sed in accumsan justo, nec vehicula sem. Donec condimentum lectus turpis. Aenean mollis tortor venenatis vestibulum dictum. Nulla feugiat lectus leo, sed varius leo vulputate ut. Donec consequat felis vitae.
        </td>
      </tr>
    </table>
  </li>
  
  <li id="2013">
    <table>
      <tr>
        <td>Feb 25</td>
        <td>
          Sed nec bibendum elit, sed aliquet ipsum. Praesent ultrices lacus id felis tincidunt, eu laoreet ligula tristique. Nulla nec facilisis tortor. Etiam sit amet augue at augue elementum pellentesque eu.
        </td>
      </tr>
      <tr>
        <td>Mar 5</td>
        <td>
	        Duis sit amet augue ac leo venenatis luctus. Donec eu augue nisi. Nulla sollicitudin vulputate sagittis. Proin sit amet blandit orci. Vestibulum arcu tellus, tempor nec posuere eu, finibus eget.
        </td>
      </tr>
      <tr>
        <td>Apr 15</td>
        <td>
	        Donec scelerisque est eget eros cursus feugiat. Fusce aliquam, lectus a sodales accumsan, dui ipsum luctus velit, quis ultrices diam ante quis nisl. Vivamus dolor elit, lacinia id mi sit.
        </td>
      </tr>
      <tr>
        <td>May 14</td>
        <td>
	        Pellentesque sit amet lectus eros. Aenean imperdiet lacus vitae nunc dictum semper. Quisque luctus tortor eu dui accumsan mattis. Vivamus eget eros urna. Cras malesuada mi in mi cursus, nec.
        </td>
      </tr>
      <tr>
        <td>May 28</td>
        <td>
	        Maecenas vestibulum quam eget lacus facilisis eleifend. Ut ac mauris a tortor ultrices aliquet vel ut erat. Mauris nunc risus, fermentum ut justo eget, feugiat egestas diam. Pellentesque ultricies efficitur.
        </td>
      </tr>
    </table>
  </li>
  
  <li id="2012">
    <table>
      <tr>
        <td>Jan 30</td>
        <td>
          Curabitur dapibus maximus neque et ultrices. Phasellus tincidunt egestas velit, vitae cursus erat suscipit non. Curabitur malesuada tempus dictum. Curabitur vel augue et dolor suscipit egestas. Vivamus ullamcorper enim ac.
        </td>
      </tr>
      <tr>
        <td>Feb 21</td>
        <td>
	        Suspendisse sit amet eros a purus accumsan ultricies ut vitae dui. Nunc volutpat odio vel turpis ultrices, aliquet euismod est auctor. Etiam et tortor nec mauris consectetur dignissim eget non.
        </td>
      </tr>
      <tr>
        <td>Mar 27</td>
        <td>
	        Sed vestibulum mattis eros vitae convallis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin aliquet enim nec odio tempor malesuada. Nam dignissim nibh est, ac dapibus libero mattis nec.
        </td>
      </tr>
      <tr>
        <td>Apr 18</td>
        <td>
	        Phasellus quam massa, finibus at nisi eget, lobortis pretium felis. Quisque nec velit risus. Donec aliquet velit vel dolor blandit, at ultrices felis rhoncus. Sed eu mi at neque commodo.
        </td>
      </tr>
      <tr>
        <td>Jun 18</td>
        <td>
	        In aliquet ligula posuere eros venenatis, blandit aliquam magna porttitor. Quisque tincidunt ultricies tortor at dignissim. In eleifend enim nisi. In auctor imperdiet lorem ut fringilla. Aenean nec aliquam dui.
        </td>
      </tr>
    </table>
  </li>
  
  <li id="2011">
    <table>
      <tr>
        <td>Feb 2</td>
        <td>
          Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nulla viverra faucibus commodo. Sed dictum dui et finibus malesuada. Sed tellus enim, hendrerit in consectetur ut.
        </td>
      </tr>
      <tr>
        <td>Apr 18</td>
        <td>
	        In hac habitasse platea dictumst. Donec feugiat tortor libero. Aenean tincidunt dolor vitae rhoncus fermentum. Sed feugiat et urna ut lobortis. Proin quis lorem nec mauris vulputate dapibus vel ut.
        </td>
      </tr>
      <tr>
        <td>Apr 20</td>
        <td>
	        Suspendisse euismod molestie finibus. Fusce et elementum sapien. Phasellus ut turpis et risus lacinia hendrerit. Sed sodales non est sit amet ultrices. Integer tempus, urna a ultrices scelerisque, lorem metus.
        </td>
      </tr>
      <tr>
        <td>May 1</td>
        <td>
	        Nullam efficitur laoreet nisl, eget fermentum nisi rhoncus eu. Sed mollis nunc augue, nec lacinia magna blandit in. Praesent vel felis ac dui consectetur pulvinar. Nam at enim quis est.
        </td>
      </tr>
    </table>
    </li>
    
    
    <li id="2010">
    <table>
      <tr>
        <td>Jan 28</td>
        <td>
          Duis eu pharetra orci. Nunc lectus augue, mattis vel laoreet eget, facilisis ut ex. Nulla facilisi. Fusce vitae pellentesque felis. Pellentesque lectus sapien, vehicula ut porttitor in, placerat porta sapien
        </td>
      </tr>
      <tr>
        <td>Jul 26</td>
        <td>
	        Vestibulum eget felis ut eros lacinia bibendum ut vitae velit. Sed eget mollis elit, in tristique mi. Nunc bibendum lorem velit, at feugiat lorem rhoncus ut. Aenean molestie vitae augue.
        </td>
      </tr>
      <tr>
        <td>Jul 27</td>
        <td>
	        Fusce ut lacus tincidunt, venenatis enim interdum, euismod metus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nam hendrerit dictum nisl, eu venenatis urna finibus.
        </td>
      </tr>
      <tr>
        <td>Sep 27</td>
        <td>
	        Nam gravida auctor sapien, sed laoreet eros pulvinar in. Nulla quis ante sed risus fringilla gravida non eu quam. Nulla vel justo hendrerit neque elementum tristique in quis nunc. Pellentesque.
        </td>
      </tr>
      <tr>
        <td>Oct 18</td>
        <td>
	        Curabitur vel risus cursus, mollis nisi ac, blandit dui. Mauris id magna vitae mauris ultrices commodo luctus vel sapien. Aliquam lorem velit, cursus faucibus est sed, eleifend porttitor mi. Vivamus.
        </td>
      </tr>
    </table>
  </li>
  
</ul>
              
            
!

CSS

              
                html, body{ 
  height: 100%; 
  margin: 0; 
  padding: 0; 
  font-family: Helvetica, Arial, sans-serif;
}

#index,
#content{
  display: inline-block;
  vertical-align: top;
  list-style: none;
  margin: 0;
  padding: 0;
}

#index{
  width: 100px;
  height: 100%;
  background: #efefef;
}

#content{
  width: calc( 100% - 120px );
  position: relative;
}


#index li{
  padding: .5em;
  font-size: 150%;
  text-align: center;
  cursor: default;
}

#index li.active{
  background: #ccc;
}

#content li{
  position: absolute;
  top: 0;
  background: white;
}

#content table tr:nth-child(even){
  background: #efefef;
}

#content table tr td:first-child{
  width: 100px;
}
              
            
!

JS

              
                TweenLite.set( $('#content li') , {opacity:0} );
TweenLite.set( $('#content li:first-child') , {opacity:1} );

$('#index li').hover(
   function() {
      liShow = $(this).attr('rel');
      $('#index li').removeClass('active');
      $(this).addClass('active');
      TweenLite.to( $('#content li[id="'+liShow+'"]') , 0.4, {opacity:1});
   },
   function() {
      liShow = $(this).attr('rel');
      $(this).removeClass('active');
      TweenLite.to( $('#content li[id="'+liShow+'"]') , 0.5, {opacity:0});  
   }
);
              
            
!
999px

Console