var blogContainer = document.getElementsByClassName('blog-container__blog-items')[0].clientHeight;
var buttonShow = document.getElementsByClassName('blog-container__button-show')[0];
console.log(child)
function blogItems(container, show) {
if (blogContainer > (container / 2) ) {
show.onclick = function onHide() {
document.getElementsByClassName('blog-container__blog-items')[0].classList.add('overflow_blog-item');
return show.onclick = function onNice() {
document.getElementsByClassName('blog-container__blog-items')[0].classList.remove('overflow_blog-item');
return blogItems(container,show)
}
}
}
}
blogItems(blogContainer,buttonShow)
var blogContainer = document.getElementsByClassName('blog-container__blog-items')[0];
var buttonShow = document.getElementsByClassName('blog-container__button-show')[0];
function blogItems(container, show) {
if (blogContainer.classList.contains('overflow_blog-item')) {
show.onclick = function onNice() {
document.getElementsByClassName('blog-container__blog-items')[0].classList.remove('overflow_blog-item');
console.log('adasd')
return false
}
} else {
show.onclick = function onHide() {
document.getElementsByClassName('blog-container__blog-items')[0].classList.add('overflow_blog-item');
console.log('lol')
return false
}
}
}