Announcement

Collapse
No announcement yet.

Menu and header not sticking, any idea why?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Menu and header not sticking, any idea why?

    So, I'm not sure what I've done but my menu and header is no longer sticking. I didn't change my structure.css file and this is what it has listed in the header. Any ideas? Could it be because I made my site secure?


    ------------------------------- =HEADER ------------------------------- */
    .header {
    background: #fff;
    margin: 0 auto;
    }
    .header.stuck,
    .header .main-header.stuck {
    background: #fff;
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    }

    /* ------------------------ pre-header ------------------------ */

    https://www.widgetsupply.com/
    Thank you,
    John

    #2
    Re: Menu and header not sticking, any idea why?

    Hi John,

    You are correct; this occurred due to the site now being secure. However, it is an easy update to make it work again.

    In your "scripts.js file", replace this:
    Code:
    // ---- On scroll, fix the header to the top ---- //
    if (document.location.protocol !== 'https:' && $(window).innerWidth() > 768) {
        $('#js-header').stuck();
    };
    with this:
    Code:
    // ---- On scroll, fix the header to the top ---- //
    if ($(window).innerWidth() > 768) {
        $('#js-header').stuck();
    };
    Matt Zimmermann

    Miva Web Developer
    Alchemy Web Development
    https://www.alchemywebdev.com
    Site Development - Maintenance - Consultation

    Miva Certified Developer
    Miva Professional Developer

    https://www.dev4web.net | Twitter

    Comment

    Working...
    X