Okay
  Public Ticket #1200078
Sticky Footer not working
Closed

Comments

  • peterpostmann started the conversation

    Hi,

    the footer is not stick in the Angular Version (tested with latest Chrome and Firefox). 


  • [deleted] replied

    Hi there,

    Can you please add the following function and then call it globally from controller this function: stickFooterToBottom();

    function stickFooterToBottom()
    {
    var public_vars = {};

    public_vars.$mainFooter = $( 'footer.main-footer' );
    public_vars.$horizontalNavbar = $( '.horizontal-menu' );

    if(isxs())
    return false;

    if(public_vars.$mainFooter.hasClass('sticky'))
    {
    var win_height = jQuery(window).height(),
    footer_height = public_vars.$mainFooter.outerHeight(true),
    main_content_height = public_vars.$mainFooter.position().top + footer_height,
    main_content_height_only = main_content_height - footer_height,
    extra_height = public_vars.$horizontalNavbar.outerHeight();


    if(win_height > main_content_height - parseInt(public_vars.$mainFooter.css('marginTop'), 10))
    {
    public_vars.$mainFooter.css({
    marginTop: win_height - main_content_height - extra_height
    });
    }
    }
    }
    // Call it from controller
    stickFooterToBottom();

    I hope this will work for you.