Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #25402

    Hello. I’m using the “Fixed Header with Social Icons” header option. Is it possible to hide the Social Icons top bar when scrolling down and only display the Fixed Header? I know this isn’t an option in the admin area, but was hoping that I could add this to possibly the avia.js file or something similar? Thanks.

    #126838

    Hi,

    Open js > avia.js, find this code

    //check if the browser supports element rotation
    function avia_header_size()
    {
    var win = $(window),
    header = $('.fixed_header #header'),
    logo = header.find('.logo img'),
    elements = $('#header_main .container, .main_menu ul:first-child > li > a:not(.avia_mega_div a)'),
    el_height = $(elements).filter(':first').height(),
    isMobile = 'ontouchstart' in document.documentElement,
    scroll_top = $('#scroll-top-link'),
    set_height = function()
    {
    var st = win.scrollTop(), newH = 0;

    if(st < el_height/2)
    {
    newH = el_height - st;
    //header.removeClass('shadow');
    }
    else
    {
    newH = el_height/2;

    //header.addClass('shadow');
    }

    elements.css({height: newH + 'px', lineHeight: newH + 'px'});
    }

    if(!header.length) return false;

    if(isMobile)
    {
    return false;
    }

    win.scroll(set_height);
    set_height();
    }

    Replace it with this:

    //check if the browser supports element rotation
    function avia_header_size()
    {
    var win = $(window),
    header = $('.fixed_header #header'),
    logo = header.find('.logo img'),
    elements = $('#header_main .container, .main_menu ul:first-child > li > a:not(.avia_mega_div a)'),
    el_height = $(elements).filter(':first').height(),
    isMobile = 'ontouchstart' in document.documentElement,
    scroll_top = $('#scroll-top-link'),
    social = $('#header_meta'),
    set_height = function()
    {
    var st = win.scrollTop(), newH = 0;

    if(st < el_height/2)
    {
    newH = el_height - st;
    social.show();
    //header.removeClass('shadow');
    }
    else
    {
    newH = el_height/2;
    social.hide();
    //header.addClass('shadow');
    }

    elements.css({height: newH + 'px', lineHeight: newH + 'px'});
    }

    if(!header.length) return false;

    if(isMobile)
    {
    return false;
    }

    win.scroll(set_height);
    set_height();
    }

    Regards,

    Ismael

    #126839

    Hi Ismael. Awesome. Words Perfect! Thanks as always for your help. :)

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Fixed Header with Social Icons’ is closed to new replies.