Search code examples
javascriptjqueryjquery-pluginsfootersticky-footer

Jquery sticky footer that adjusts with dynamic content


I'm currently using the plugin here http://codedumper.com/jquerystickyfooter to create a sticker footer.

Take a look http://client.astam.co.uk. It works as you would expect.

The only problem is that, for example, if an error message comes up and the user clicks to remove, or toggled content is available the footer will jump up from the bottom of the browser until the window is resized and then it will sort itself out.

Is there a way for the plugin to know to re-position itself?


Solution

  • Better use $.stickyFooterPos() as a callback for other layout changing functions like changing the close function in your app.js to

        function close(){
        $(this).attr('href', 'javascript:void(0)');
        $(this).parent().fadeOut(200,function(){$.stickyFooterPos()});
    }
    

    P.S: as others suggested, position:fixed is a far more better choice considering the fact that the number of IE6 users are declining... (see http://www.w3schools.com/browsers/browsers_explorer.asp and also http://www.w3schools.com/browsers/browsers_stats.asp )