(function ($) {
"use strict";
// document ready function
$(document).ready(function($){
/*
|--------------------------------------------------------------------------
| Equal Height
|--------------------------------------------------------------------------
*/
window.equalNews = 0;
function equalNews() {
clearInterval(window.equalNews);
if($(window).width() >= 992) {
$('.equal-news__list').css('height', $('.equal-news__col').innerHeight());
window.equalNews = setInterval(function(){
if($('.equal-news__list').innerHeight() != $('.equal-news__col').innerHeight()) {
$('.equal-news__list').css('height', $('.equal-news__col').innerHeight());
}
}, 200);
} else {
$('.equal-news__list').css('height', 'auto');
}
}
equalNews();
/*
|--------------------------------------------------------------------------
| Social Side
|--------------------------------------------------------------------------
*/
// тут разные ивенты на клик мышки
/*
|--------------------------------------------------------------------------
| Owl Carousel
|--------------------------------------------------------------------------
*/
// тут скрипт карусели
});
// window onload
$(window).on('load',function(){
// Call responsify function when window object is loaded
$('jsResponsify').responsify();
// Call equalNews function when window object is loaded
equalNews();
});
// window onresize
$(window).resize(function(){
// Call responsify function when window object is loaded
$('jsResponsify').responsify();
// Call equalNews function when window object is loaded
equalNews();
});
}(jQuery));
$(function(){
var mediaQuerySM = window.matchMedia('(max-width: 992px)');
window.equalNews = 0;
function equalNews(mediaQueryXS) {
if (mediaQueryXS.matches) {
$('.equal-news__list').css('height', $('.equal-news__col').innerHeight());
window.equalNews = setInterval(function(){
if($('.equal-news__list').innerHeight() != $('.equal-news__col').innerHeight()) {
$('.equal-news__list').css('height', $('.equal-news__col').innerHeight());
}
});
} else {
$('.equal-news__list').css('height', 'auto');
}
}
equalNews(mediaQueryXS);
mediaQueryXS.addListener(equalNews);
});