$(document).ready(function() { if (parseInt($(window).width()) > 768){ var height = $(window).height(); $('.full').css('min-height',height); $(window).resize(function(){ var height = $(window).height(); $('.full').css('min-height',height); }); } $('.sidebar-close').click(function(){ $('#sidebar').removeClass('pull'); }); $('[data-toggle=sidebar]').click(function(){ if($('#sidebar').hasClass('pull')){ $('#sidebar').removeClass('pull'); } else { $('#sidebar').addClass('pull'); } return false; }); $('#sidebar').click(function(){ $(this).removeClass('pull'); }); $('#sidebar ul.nav').click(function(e){ e.stopPropagation(); }); }); $(function floatHeader(){ /*if (parseInt($(window).width()) > 768){*/ var stickyHeaderTop = parseInt($('.header').offset().top); if($(window).scrollTop() > 0){ $('.header').addClass('float'); } $(window).scroll(function(){ if( $(window).scrollTop() > 0 ) { $('.header').addClass('float'); } else { $('.header').removeClass('float'); } }); /*}*/ });