Skip to content

Instantly share code, notes, and snippets.

@nixon1333
Last active August 29, 2015 14:06
Show Gist options
  • Save nixon1333/483d60bd3450fae31ee5 to your computer and use it in GitHub Desktop.
Save nixon1333/483d60bd3450fae31ee5 to your computer and use it in GitHub Desktop.
<?php
/* The loop */
if ( get_post_gallery() ) :
$gallery = get_post_gallery( $post, false );
?>
<div class="sliderss">
<a href="javascript:" class="pera-close"></a>
<?php
/* Loop through all the image and output them one by one */
foreach( $gallery['src'] AS $src )
{
?>
<div><img src="<?php echo $src; ?>" class="my-custom-class" alt="Gallery image" /></div>
<?php
}
endif;
?>
</div>
<div class="slidernxn">
</div>
<div class="nixon-sls">
<a href="javascript:" class="pera-close"></a>
</div>
===================================================================
$('.gallery_img').click(function(e) {
e.preventDefault();
$('.nixon-sls').unslick();
$('.pera-close').show();
var nixon = $(this).parents('.oks').find('.sliderss').html();
$('.nixon-sls').html(nixon);
$('.slidernxn').fadeIn();
var heish = $(document).scrollTop()+70;
$('.nixon-sls').css('top',heish+'px');
$('.nixon-sls').show();
$('.nixon-sls').slick();
});
$(document).on('click', '.pera-close', function(e){
e.preventDefault();
$('.slidernxn').fadeOut("slow");
$('.pera-close').hide();
$('.nixon-sls').hide();
$('.nixon-sls').unslick();
});
==========================================================
.slidernxn{
z-index: 999;
display: none;
position: fixed;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
margin: 0px;
padding: 0px;
background-color: rgba(26,24,23,0.8);
}
.pera-close
{
position: absolute;
left: 30px;
top: -22px;
background-image: url("css/img/tobis-close.png");
width: 52px;
height: 60px;
z-index: 2;
}
.nixon-sls{
background-color: #292929;
position: absolute;
/*height: auto;*/
width: 40%;
/*margin: -100px 0 0 -200px;*/
top: 5%;
left: 30%;
/*right: 15%;*/
z-index: 9999;
}
.slick-slider{
position:absolute !important;
}
.slick-slide img{
padding: 5px;
width: 100%;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment