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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

            
              
		<!-- Image portfolio -->
		<div class="container-fluid">
			<div class = "row">
				<div class ="col-md-8 col-md-offset-2">
					<!-- image Filter -->
					<gallery-filter id="filters">
					
				<navbutton data-filter=".car">car</navbutton>
			<navbutton data-filter=".donkey">donkey</navbutton>
			<navbutton class="open" data-filter="*">all</navbutton>
			
		</gallery-filter>
		<!-- image filter end -->
	</div>
</div>
<!-- Gallery -->
<div class = "row">
	<div class ="col-md-10 col-md-offset-1">
		

<div class="grid" id="filters">
  <div class="grid-sizer"></div>


 

<div class="grid-item car">
    <a class="fancybox fancybox-image fancybox-thumbs" rel="gallery1" href="https://s3-us-west-2.amazonaws.com/s.cdpn.io/82/drizzle.jpg" /><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/82/drizzle.jpg" alt="" /></a>
  </div>

<div class="hidden">
    <a class="fancybox fancybox-image fancybox-thumbs" rel="gallery1"  href="https://s3-us-west-2.amazonaws.com/s.cdpn.io/82/one-world-trade.jpg" /><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/82/one-world-trade.jpg" alt="" /></a>
  </div>


 
 
  <div class="grid-item">
    <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/82/flight-formation.jpg" />
  </div>
</div>

		
	</div>
</div>
<!-- end of gallery -->
</div>
            
          
!
            
              

.menu {
	background-color: white;
	position: relative;

}

h1 {
	font-size: 100px;
}

body {
	background-color:#eee;
}


.topmargin {
	display: inline-block;
	margin-top: 80px;	
}

.topmargin-sm {

	margin-top: 50px;	
}
/* === Divider === */

.divider {
	color: #000;
	font-size: 20px;
	font-weight:300;
	margin: 40px auto;
	overflow: hidden;
	text-align: center;
	width: 70%;  
}

.divider:before, .divider:after {
	border-bottom: 1px solid;
 	content: "";
    display: inline-block;
    margin: 0 .5em 0 -55%;
    vertical-align: middle;
    width: 85%;
}
.divider:after {
	margin: 0 -55% 0 .5em;
}


/* ===== ISOTOPE STUFF ========= /*

/*filter menu */
gallery-filter {
  background: #eee;
  display: -ms-inline-flexbox;
  display: inline-flex;
  float: right;
  margin-bottom: 15px;
}

navbutton {
  padding: 1em;
}

gallery-filter:hover navbutton {
  display: block;
}

navbutton:not(.open) {
  display: none;
}

.open {
  background: #000;
  color: white;
}

/* ---- isotope ---- */

.grid {
  background: #DDD;
}

/* clear fix */
.grid:after {
	 clear: both;
	 content: '';
	 display: block;
}

/* ---- .grid-item ---- */

.grid-sizer,
.grid-item {
  width: 33.2%;
}

.grid-item {
  float: left;
}

.grid-item img {
  display: block;
  width: 100.5%;
}


/*======= Footer ===== */

.footer {	
	background-color: gray;
	border-top: 5px solid gray;
	margin-top:50px;
	padding-bottom: 20px;
	position: relative;
}

	
/* go to top */

.return-to-top {
	background: rgb(0, 0, 0);
    background: rgba(0, 0, 0, 0.7);
    border-radius: 35px;
    bottom: 20px;
    display:none;
    height: 50px;
    position: fixed;
    right: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 50px;
}

.return-to-top i {
    color: #fff;
    font-size: 19px;
    left: 16px;
    margin: 0;
    position: relative;
    top: 13px;

}

.return-to-top:hover {
    background: rgba(0, 0, 0, 0.9);
}

.return-to-top:hover i {
    color: #fff;
    top: 5px;
}


/*   fancy box stuff goes here */

/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */
.fancybox-wrap,
.fancybox-skin,
.fancybox-outer,
.fancybox-inner,
.fancybox-image,
.fancybox-wrap iframe,
.fancybox-wrap object,
.fancybox-nav,
.fancybox-nav span,
.fancybox-tmp
{
	border: 0;
	margin: 0;
	outline: none;
	padding: 0;
	vertical-align: top;
}

.fancybox-wrap {
	left: 0;
	position: absolute;
	top: 0;
	z-index: 8020;
}

.fancybox-skin {
	position: relative;
	background: #f9f9f9;
	color: #444;
	text-shadow: none;
	-webkit-border-radius: 4px;
	   -moz-border-radius: 4px;
	        border-radius: 4px;
}

.fancybox-opened {
	z-index: 8030;
}

.fancybox-opened .fancybox-skin {
	-webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
	   -moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
	        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.fancybox-outer, .fancybox-inner {
	position: relative;
}

.fancybox-inner {
	overflow: hidden;
}

.fancybox-type-iframe .fancybox-inner {
	-webkit-overflow-scrolling: touch;
}

.fancybox-error {
	color: #444;
	font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
	margin: 0;
	padding: 15px;
	white-space: nowrap;
}

.fancybox-image, .fancybox-iframe {
	display: block;
	width: 100%;
	height: 100%;
}

.fancybox-image {
	max-width: 100%;
	max-height: 100%;
}

#fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
	background-image: url('fancybox_sprite.png');
}

#fancybox-loading {
	position: fixed;
	top: 50%;
	left: 50%;
	margin-top: -22px;
	margin-left: -22px;
	background-position: 0 -108px;
	opacity: 0.8;
	cursor: pointer;
	z-index: 8060;
}

#fancybox-loading div {
	width: 44px;
	height: 44px;
	background: url('fancybox_loading.gif') center center no-repeat;
}

.fancybox-close {
	position: absolute;
	top: -18px;
	right: -18px;
	width: 36px;
	height: 36px;
	cursor: pointer;
	z-index: 8040;
}

.fancybox-nav {
	position: absolute;
	top: 0;
	width: 40%;
	height: 100%;
	cursor: pointer;
	text-decoration: none;
	background: transparent url('blank.gif'); /* helps IE */
	-webkit-tap-highlight-color: rgba(0,0,0,0);
	z-index: 8040;
}

.fancybox-prev {
	left: 0;
}

.fancybox-next {
	right: 0;
}

.fancybox-nav span {
	position: absolute;
	top: 50%;
	width: 36px;
	height: 34px;
	margin-top: -18px;
	cursor: pointer;
	z-index: 8040;
	visibility: hidden;
}

.fancybox-prev span {
	left: 10px;
	background-position: 0 -36px;
}

.fancybox-next span {
	right: 10px;
	background-position: 0 -72px;
}

.fancybox-nav:hover span {
	visibility: visible;
}

.fancybox-tmp {
	position: absolute;
	top: -99999px;
	left: -99999px;
	visibility: hidden;
	max-width: 99999px;
	max-height: 99999px;
	overflow: visible !important;
}

/* Overlay helper */

.fancybox-lock {
    overflow: hidden !important;
    width: auto;
}

.fancybox-lock body {
    overflow: hidden !important;
}

.fancybox-lock-test {
    overflow-y: hidden !important;
}

.fancybox-overlay {
	position: absolute;
	top: 0;
	left: 0;
	overflow: hidden;
	display: none;
	z-index: 8010;
	background: url('fancybox_overlay.png');
}

.fancybox-overlay-fixed {
	position: fixed;
	bottom: 0;
	right: 0;
}

.fancybox-lock .fancybox-overlay {
	overflow: auto;
	overflow-y: scroll;
}

/* Title helper */

.fancybox-title {
	visibility: hidden;
	font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
	position: relative;
	text-shadow: none;
	z-index: 8050;
}

.fancybox-opened .fancybox-title {
	visibility: visible;
}

.fancybox-title-float-wrap {
	position: absolute;
	bottom: 0;
	right: 50%;
	margin-bottom: -35px;
	z-index: 8050;
	text-align: center;
}

.fancybox-title-float-wrap .child {
	display: inline-block;
	margin-right: -100%;
	padding: 2px 20px;
	background: transparent; /* Fallback for web browsers that doesn't support RGBa */
	background: rgba(0, 0, 0, 0.8);
	-webkit-border-radius: 15px;
	   -moz-border-radius: 15px;
	        border-radius: 15px;
	text-shadow: 0 1px 2px #222;
	color: #FFF;
	font-weight: bold;
	line-height: 24px;
	white-space: nowrap;
}

.fancybox-title-outside-wrap {
	position: relative;
	margin-top: 10px;
	color: #fff;
}

.fancybox-title-inside-wrap {
	padding-top: 10px;
}

.fancybox-title-over-wrap {
	position: absolute;
	bottom: 0;
	left: 0;
	color: #fff;
	padding: 10px;
	background: #000;
	background: rgba(0, 0, 0, .8);
}

/*Retina graphics!*/
@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
	   only screen and (min--moz-device-pixel-ratio: 1.5),
	   only screen and (min-device-pixel-ratio: 1.5){

	#fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
		background-image: url('fancybox_sprite@2x.png');
		background-size: 44px 152px; /*The size of the normal image, half the size of the hi-res image*/
	}

	#fancybox-loading div {
		background-image: url('fancybox_loading@2x.gif');
		background-size: 24px 24px; /*The size of the normal image, half the size of the hi-res image*/
	}
}

#fancybox-thumbs {
	position: fixed;
	left: 0;
	width: 100%;
	overflow: hidden;
	z-index: 8050;
}

#fancybox-thumbs.bottom {
	bottom: 2px;
}

#fancybox-thumbs.top {
	top: 2px;
}

#fancybox-thumbs ul {
	position: relative;
	list-style: none;
	margin: 0;
	padding: 0;
}

#fancybox-thumbs ul li {
	float: left;
	padding: 1px;
	opacity: 0.5;
}

#fancybox-thumbs ul li.active {
	opacity: 0.75;
	padding: 0;
	border: 1px solid #fff;
}

#fancybox-thumbs ul li:hover {
	opacity: 1;
}

#fancybox-thumbs ul li a {
	display: block;
	position: relative;
	overflow: hidden;
	border: 1px solid #222;
	background: #111;
	outline: none;
}

#fancybox-thumbs ul li img {
	display: block;
	position: relative;
	border: 0;
	padding: 0;
	max-width: none;
}

.hidden {
    display: none;
}


/* elevate zoom */
.zoomContainer { 
	z-index: 100000;
}
            
          
!
            
              // filter menu

$(document).ready(function() {
	
	var navbutton = $('navbutton');

	navbutton.on('click', function(){

		$(this).siblings().removeClass('open').end().addClass('open');

	});



var $grid = $('.grid').isotope({
  itemSelector: '.grid-item',
  percentPosition: true,
  masonry: {
    columnWidth: '.grid-sizer'
  }
}); 

	// layout Isotope after each image loads
$grid.imagesLoaded().progress( function() {
  $grid.isotope('layout');
}); 

 $('#filters').on( 'click', 'navbutton', function() {
    var filtr = $( this ).attr('data-filter');
    $grid.isotope({ filter: filtr });
  });

// ===== Scroll to Top ==== 
$(window).scroll(function() {
    if ($(this).scrollTop() >= 350) {        // If page is scrolled more than 350px
        $('.return-to-top').fadeIn(200);    // Fade in the arrow
    } else {
        $('.return-to-top').fadeOut(200);   // Else fade out the arrow
    }
});

$('.return-to-top').click(function() {      // When arrow is clicked
    $('body,html').animate({
        scrollTop : 0                       // Scroll to top of body
    }, 500);
});


// ========= fancybox js ============//
			$('.fancybox-thumbs').fancybox({
				prevEffect : 'none',
				nextEffect : 'none',

				closeBtn  : false,
				arrows    : false,
				nextClick : true,

				autoCenter: true,

				helpers : {
					thumbs : {
						width  : 75,
						height : 75
					}
				},
        afterShow: function() {
           $('img.fancybox-image').elevateZoom({ 
             zoomType: "inner",
cursor: "crosshair",
zoomWindowFadeIn: 500,
zoomWindowFadeOut: 750
           });
       },
       afterClose: function() {
         $('.zoomContainer').remove();
       }
			});


});


            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console