cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

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.

Quick-add: + add another resource

Code Indentation

     

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.

            
              <ul class="menu">
        <li class="to-home"><a href="#">Home</a></li>
        <li><a href="#about">About cats</a></li>
        <li><a href="#gallery">Gallery</a></li>
        <li><a href="#links">Links</a></li>
        <li><a href="#contacts">Contacts</a></li>
    </ul>

    <div id="about" class="page">
        <div class="page-content">
            <h2>About cats</h2>

            <p>Cats are cute</p>
        </div>
    </div>

    <div id="gallery" class="page">
        <div class="page-content">
            <h2>Gallery</h2>

            <p>Gallery with cats</p>
        </div>
    </div>

    <div id="links" class="page">
        <div class="page-content">
            <h2>Links</h2>

            <p>Links to blogs with cats</p>
        </div>
    </div>

    <div id="contacts" class="page">
        <div class="page-content">
            <h2>Contacts</h2>

            <p>Some contact form</p>
        </div>
    </div>

            
          
!
            
              body,div,p {
	margin:0;
	padding:0;
	font-family:Helvetica,sans-serif;
	font-size:18px;
}


html {
	background:url("http://ivayloyovchev.com/pulsepro/data/img/gallery/wedding/IMG_3312.jpg") no-repeat center center fixed;
	-webkit-background-size:cover;
	-moz-background-size:cover;
	-o-background-size:cover;
	background-size:cover;
}

.menu {
	position:fixed;
	top:10%;
	left:-40px;
	z-index:100;
}

.menu li {
	list-style:none;
	display:block;
	margin-bottom:5px;
	margin-left:0;
	padding:20px;
	background-color:rgba(0,0,0,0.7);
	-webkit-box-sizing:border-box;
	-moz-box-sizing:border-box;
	box-sizing:border-box;
	text-align:center;
	width:140px;
	cursor:pointer;
}

.menu li.active {
	background-color:rgba(91,193,177,.75);
	cursor:default;
}

.menu li a {
	text-decoration:none;
	color:#fff;
}

.page {
	position:relative;
	background-color:rgba(0,0,0,0.7);
	width:70%;
	height:100%;
	position:fixed;
	left:-70%;
	overflow:hidden;
	z-index:10;
}

.page-content {
	position:absolute;
	width:55%;
	height:80%;
	top:10%;
	right:15%;
	color:#fff;
	overflow:auto;
}
            
          
!
            
              $(function() {

//Image by Ivaylo Yovchev (  http://ivayloyovchev.com/weddings )
  
	//elements
	var $menu = $(".menu");
	var $pages = $(".page");
	var $menuLi = $menu.find("li").not(".to-home");
	var $toHome = $menu.find(".to-home");
	
	//interna vars
	var currentPage = "";
	
	$toHome.on("click", function() {
		currentPage = "";
		TweenMax.to($pages, 0.5, {
			left: "-70%"
		});
		TweenLite.to($menuLi.filter(".active"), 0.5, {
			className: "-=active"
		});
	});
	
	$menuLi.on("click", function(event) {
		
		var $this = $(this);
		var thisHref = $this.find("a").attr("href");
		
		if (currentPage !== thisHref && $pages.filter(thisHref).length > 0) {
			currentPage = thisHref;
			TweenMax.to($pages, 0.5, {
				left: "-70%"
			});
			TweenMax.to($pages.filter(thisHref), 0.5, {
				left: 0
			});
			TweenLite.to($menuLi.filter(".active"), 0.5, {
				className: "-=active"
			});
			TweenLite.to($this, 0.5, {
				className: "+=active"
			});
		}
		
		event.preventDefault();
	});
});
            
          
!
999px
Loading ..................

Console