Guest User

Content Height

a guest
Jul 29th, 2013
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var setBlogPageHeight = function() {
  2.     if ($('#wpadminbar').length) {
  3.         var content_height = $(window).height() - $('#header').outerHeight() - $('#footer').outerHeight() - $('#wpadminbar').outerHeight() - $('#blog-page-container .intro-container').outerHeight();
  4.         $('#posts-container').css({'minHeight':content_height});
  5.     } else {
  6.         var content_height = $(window).height() - $('#header').outerHeight() - $('#footer').outerHeight() - $('#blog-page-container .intro-container').outerHeight();
  7.         $('#posts-container').css({'minHeight':content_height});
  8.     }
  9. };
  10.  
  11. var checkBlogPosition = function() {
  12.     if ($(document).height() - $(this).height() === $(this).scrollTop() && $(window).width() > 1024) {
  13.         getBlogPosts();
  14.     }
  15. };
Advertisement
Add Comment
Please, Sign In to add comment