Pen Settings



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


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


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.


Save Automatically?

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.


                	<div class="more">
		<nav class="menu">
				<li id="blue" >Blue Point</li>
				<li id="black" >Black Point</li>
				<li id="green" >Green Point</li>
				<li id="yellow" >Yellow Point</li>

<div id="content">
  <div class="space"></div>   <!--  !!!  just some space to scroll with a special easing -->
  <h2 id="section1">BLUE</h2>
  <h2 id="section2">BLACK</h2>
  <h2 id="section3">GREEN</h2>
  <h2 id="section4">YELLOW</h2>
  <div class="space"></div>     <!--  !!!  just some space to scroll -->


                .more {
  position: relative;
  width: 135px;
  height: 200px;
  margin: 20px 0 0 20px;
  cursor: pointer;

.more h2 {
  font-size: 20px;
  margin: 0;

.menu {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 10px;
  visibility: hidden;

ul {
  padding: 0;
  margin: 0;

.menu li {
  display: block;
  padding: 6px 30px 6px 0px;
  font-size: 18px;
  font-weight: 300;

.menu li:hover {
  color: red;

#content {
  position: relative;
  text-align: center;
  margin-left: 20px;
  width: 150px;
  height: 45px;
  overflow: hidden;
  border: 1px solid red;

#content h2 {
  height: 40px;
  margin: 10px 0 10px 0;   /* corresponding with 'offsetY' in the tween */
.space {
  height: 100px;


                //=========== Menu =================================
	var menu = new TimelineMax({paused:true});".menu", 0.3, {height: 'inherit', autoAlpha: 1}, 0 )

	$('.more h2').mouseenter(function(){;

//  see:

  TweenLite.set("#content", {scrollTo:{y:"#section1", offsetY:10}}); // set to the first section if wannted
	$(".menu li").each(function(index, element){
    $(this).click(function(){"#content", 1.5, {scrollTo:{y:"#section" + (index+1), offsetY:10}, ease: Elastic.easeOut.config(1, 0.5)});