Hi Chris,

Looks like the problem lies with the lines where the function is being called. Either put it inside an anonymous function or use a named reference to the function instead. Try something like this.

$(document).ready(function() {
   stickyFooter();

   $(window).resize(function() {
      stickyFooter();
   });
});

or this ...

$(document).ready(function() {
   stickyFooter();

   $(window).resize(stickyFooter);
});

--Karl
____________
Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Jun 4, 2008, at 8:51 PM, Chris P wrote:


Better yet, change line second line of stickFooter function to:

   var height = $(document).height() - 341;

And remove the third line entirely.

Carl

Thanks for responding Carl.  This is what I ended up using as you
prescribed.

<script type="text/javascript">
var stickyFooter = function() {
        var height = $(document).height() - 341;
   $('#footer').css('margin-top', height);
}
$(document).ready(
   stickyFooter()
);
$(window).resize(
   stickyFooter()
);
</script>

But Firebug tells me "document.body has no properties" with the error
seemingly in the jQuery library.

Thanks!

Reply via email to