On 5 Jun., 06:22, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> or this ...
>
> $(document).ready(function() {
>     stickyFooter();
>
>     $(window).resize(stickyFooter);
>
> });

How about:

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

You wouldn't need a named function here anymore:

$(function() {
    $(window).
        resize(function() {
            var height = $(document).height() - 341;
            $('#footer').css('margin-top', height);
        }).
        trigger('resize');
});

But do you really need JavaScript at all and can't let CSS do its job?

#footer {
    position: fixed;
    bottom: 0;
}


--Klaus

Reply via email to