CSS
- 2 ответа
- 0 вопросов
2
Вклад в тег
<!-- VK Widget -->
<div id="vk_widget" style="width: 100%;"></div>
<script type="text/javascript" src="//vk.com/js/api/openapi.js?136"></script>
<script !src="">
function VK_Widget_Init(){
var getWidth = document.getElementById("vk_widget").clientWidth;
console.log(getWidth);
document.getElementById('vk_widget').innerHTML = '<div id="vk_groups"></div>';
VK.Widgets.Group("vk_groups", {
mode: 1,
color2: '37474F',
width: getWidth,
}, ID_ГРУППЫ);
};
window.addEventListener('load', VK_Widget_Init, false);
window.addEventListener('resize', VK_Widget_Init, false);
</script>
var footer = $('.footer'),
pageContainer = $('.page-container'),
fixClass = 'navbar-fixed-bottom';
function stickyFooter() {
var windowHeight = $(window).height(),
contentHeight = pageContainer.height(),
footerHeight = footer.height();
footer.removeClass(fixClass);
if (contentHeight <= windowHeight-footerHeight){
footer.addClass(fixClass);
}
}
stickyFooter();
$(window).resize(function () {
stickyFooter();
});
<div class="page-container">
<section class="header"></section>
<section class="nav"></section>
<section class="content"></section>
</div>
<div class="footer">
</div>