$(function(){
resizeAll();
$(window).bind("resize", function(){
resizeAll();
});
});
$(window).bind('load', function() {resizeAll()});
function footerStickBottom (footer_block) {
$(footer_block).css({'margin-top':0});
var allWindowsHeight = $(window).height();
var footerBottomOffset = $(footer_block).offset().top + $(footer_block).outerHeight();
// console.log(allWindowsHeight);
// console.log(footerBottomOffset);
if (allWindowsHeight > footerBottomOffset) {
var footerMarginTop = allWindowsHeight - footerBottomOffset;
$(footer_block).css({'margin-top':footerMarginTop});
}
}
function resizeAll() {
footerStickBottom ('.footer');
}
box-sizing: border-box;
main {
min-width: 100%;
max-height: 100%;
padding: 15px;
}
*, *:before, *:after {
box-sizing: border-box;
}
if ($(document).height() <= $(window).height())
$("footer.footer").addClass("navbar-fixed-bottom");
$(".block").each(function() {
if ($(this).height() > 200) {
// показываем кнопку
} else {
// не показываем
}
});
.active {
height: 300px;
cursor: pointer;
background-color: green;
overflow: auto;
}
$('.qwerty').on('click', function() {
$(this).toggleClass('active');
});