title: Sticky Footers that move down when dynamic content gets loaded
body: <p>I've been using <a href="http://www.hardcode.nl/archives_139/article_244-jquery-sticky-footer" rel="nofollow noreferrer">this snippet</a> of jQuery to get a sticky footer:</p>
  
  <pre><code>if($(document.body).height() &lt; $(window).height()){
          $("#footer").css({
              position: "absolute",
              top:  ( $(window).scrollTop() + $(window).height()
                    - $("#footer").height() ) + "px",
              width: "100%"
         });
  }
  $(window).scroll(positionFooter).resize(positionFooter);
  </code></pre>
  
  <p>However, that breaks when I've got expandable/collapsible divs lying around where the original content was less high than the window, since it is then stuck to the bottom of the window, rather than the bottom of the document.</p>
  
  <p>Is there a way of fixing this, or a better way of doing it?</p>
  
  <p>Please bear in mind that I don't have much control over the HTML, since I need to do this in Django's admin interface, which doesn't allow much injection of HTML in the places you might want to to accomplish this sort of thing (i.e. <a href="https://stackoverflow.com/questions/1424610/sticky-footer-css-problems/1424625#1424625">this answer</a> and <a href="https://stackoverflow.com/questions/42294/how-do-you-get-the-footer-to-stay-at-the-bottom-of-a-web-page/42301#42301">this answer</a> don't work for me).</p>