100 lines
1.9 KiB
JavaScript
100 lines
1.9 KiB
JavaScript
/* equal height of articles blocks */
|
||
$(window).load(function () {
|
||
height_normalize();
|
||
});
|
||
$(window).resize(function(){
|
||
height_normalize();
|
||
});
|
||
|
||
|
||
/*
|
||
$(window).on("load resize", function () {
|
||
height_normalize();
|
||
});
|
||
*/
|
||
|
||
function height_normalize() {
|
||
|
||
if ( $(window).width() > 450){
|
||
var maxHeight = 0;
|
||
$(".articles_list").find(".item .border").each(function (){
|
||
if ($(this).height() > maxHeight) maxHeight = $(this).height();
|
||
}).height(maxHeight);
|
||
|
||
maxHeight = 0;
|
||
$(".articles_list").find(".item .img_outer").each(function (){
|
||
if ($(this).height() > maxHeight) maxHeight = $(this).height();
|
||
}).height(maxHeight);
|
||
|
||
maxHeight = 0;
|
||
$(".reviews").find(".item .border").each(function (){
|
||
if ($(this).height() > maxHeight) maxHeight = $(this).height();
|
||
}).height(maxHeight);
|
||
|
||
}
|
||
};
|
||
|
||
|
||
|
||
/* reviews owlCarousel */
|
||
$(document).ready(function(){
|
||
if ($("div").is(".owl-reviews")){
|
||
$(".owl-reviews").owlCarousel({
|
||
loop:false,
|
||
margin:30,
|
||
nav:true,
|
||
dots:true,
|
||
dotsEach: true,
|
||
__mouseDrag : false,
|
||
__touchDrag : false,
|
||
__navText:["<span aria-label='Next'>›</span>","<span aria-label='Previous'>‹</span>"],
|
||
responsive:{
|
||
0:{
|
||
items:1
|
||
},
|
||
500:{
|
||
items:2
|
||
},
|
||
870:{
|
||
items:3
|
||
},
|
||
1200:{
|
||
items:4
|
||
}
|
||
}
|
||
});
|
||
}
|
||
});
|
||
|
||
|
||
(function($) {
|
||
$(window).on('load', function() {
|
||
if ($("div").is(".reviews_list")){
|
||
$('.reviews_list .item .border .inner').mCustomScrollbar({
|
||
axis: 'y',
|
||
scrollInertia: '330'
|
||
});
|
||
}
|
||
});
|
||
})(jQuery);
|
||
|
||
|
||
$(document).ready(function() {
|
||
$('a.menu_openbtn').click( function(event){
|
||
event.preventDefault();
|
||
$('#menu_modal_overlay').fadeIn(297, function(){
|
||
$('#menu_modal')
|
||
.css('display', 'block')
|
||
.animate({opacity: 1}, 198);
|
||
});
|
||
});
|
||
|
||
$('#menu_modal__close, #menu_modal_overlay').click( function(){
|
||
$('#menu_modal').animate({opacity: 0}, 198, function(){
|
||
$(this).css('display', 'none');
|
||
$('#menu_modal_overlay').fadeOut(297);
|
||
});
|
||
});
|
||
});
|
||
|