-
-
Save imemohit/7ca2610cc26f4ffc84a7b9501c566d5b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
, | |
basicInit : function() { | |
retinizer(); | |
var $container = this.settings.targetContainer; | |
$('.dt-gallery-mfp-popup', $container).not('.mfp-ready').on('click', function(){ | |
var $this = $(this), | |
$container = $this.parents('article.post'); | |
if ( $container.length > 0 ) { | |
var $target = $container.find('.dt-gallery-container a.dt-mfp-item'); | |
if ( $target.length > 0 ) { | |
$target.first().trigger('click'); | |
} | |
} | |
return false; | |
}).addClass('mfp-ready'); | |
// trigger click on first a.dt-mfp-item in the container | |
$('.dt-trigger-first-mfp', $container).not('.mfp-ready').on('click', function(){ | |
var $this = $(this), | |
$container = $this.parents('article.post'); | |
if ( $container.length > 0 ) { | |
var $target = $container.find('a.dt-mfp-item'); | |
if ( $target.length > 0 ) { | |
$target.first().trigger('click'); | |
} | |
} | |
return false; | |
}).addClass('mfp-ready'); | |
// single opup | |
$('.dt-single-image', $container).not('.mfp-ready').magnificPopup({ | |
type: 'image' | |
}).addClass('mfp-ready'); | |
$('.dt-single-video', $container).not('.mfp-ready').magnificPopup({ | |
type: 'iframe' | |
}).addClass('mfp-ready'); | |
$('.dt-single-mfp-popup', $container).not('.mfp-ready').magnificPopup({ | |
type: 'image' | |
}).addClass('mfp-ready'); | |
$(".dt-gallery-container", $container).not('.mfp-ready').each(function(){ | |
$(this).addClass('mfp-ready').magnificPopup( $.extend( {}, dtGlobals.magnificPopupBaseConfig, { | |
delegate: 'a.dt-mfp-item', | |
gallery: { | |
enabled: true, | |
navigateByImgClick: true, | |
preload: [0,1] // Will preload 0 - before current, and 1 after the current image | |
} | |
})); | |
}); | |
$(".rollover, .rollover-video, .post-rollover, .rollover-project .show-content", $container).addRollover(); | |
$('.no-touch .hover-grid .rollover-project').each( function() { $(this).hoverdir(); } ); | |
$('.no-touch .hover-grid-reverse .rollover-project ').each( function() { $(this).hoverdir({ | |
inverse : true | |
}); } ); | |
$(".touch .rollover-project a.link.show-content, .hover-style-one article:not(.description-off) .rollover-project > a, .hover-style-two article:not(.description-off) .rollover-project > a, .hover-style-three article:not(.description-off) .rollover-project > a").on("click", function(e){ | |
e.preventDefault(); | |
}); | |
$(".rollover, .post-rollover, .rollover-video").clickEffectPics(); | |
$(".rollover.material-click-effect, .post-rollover.material-click-effect, .rollover-video.material-click-effect").clickMaterialEffect(); | |
if($(".small-portfolio-icons").length > 0){ | |
$('.links-container a').each(function(){ | |
var $this = $(this); | |
$this.addClass("waves-effect"); | |
}); | |
Waves.displayEffect(); | |
} | |
$(".touch .rollover-project").touchNewHover(); | |
// $(".touch .links-container > a").touchHoverLinks(); | |
$(".no-touch .rollover-project:not(.rollover-active) .rollover-content, .no-touch .buttons-on-img:not(.rollover-active) .rollover-content").triggerHoverClick(); | |
$(".no-touch .rollover-project.forward-post").forwardToPost(); | |
$(".no-touch .rollover-project.rollover-active, .no-touch .buttons-on-img.rollover-active").followCurentLink(); | |
$(".albums .rollover-project, .albums .buttons-on-img").triggerAlbumsClick(); | |
$(".touch .rollover-project.forward-post").touchforwardToPost(); | |
$(".touch .buttons-on-img").touchHoverImage(); | |
$(".hover-scale .rollover-project").scaleInHover(); | |
$(".links-container a").hoverLinks(); | |
if($(".style-material-design").length > 0) { | |
$('.links-container a, .paginator .page-nav a').each(function(){ | |
var $this = $(this); | |
$this.addClass("waves-effect"); | |
}); | |
Waves.displayEffect(); | |
} | |
// if ( !dtGlobals.isMobile){ | |
// $("img").loaded(null, function() { | |
// $(".image-blur .rollover-project a:not(.hover-style-three .rollover-project a), .image-blur .rollover, .image-blur .rollover > div, .image-blur .post-rollover, .image-blur .rollover-video").blurImage(); | |
// }, true); | |
// } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment