• Is it possible to change something about the div being stuck when it gets stuck?

    Ie; change the logo to a smaller logo, hide social media icons, etc?

    Or, if not, is it possible to have the plugin append a secondary class name to that div when it sticks, so I can target the content via CSS once it’s stuck?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi, thanks for trying my plugin! ??

    You can target various items in your sticky element with some clever CSS. For example, if your sticky element has a logo, you can target that normally with (let’s say) .logo.

    To add a style to the logo when your element is NOT sticky, you can use:

    .sticky-element-original.sticky-element-active .logo {
        /* Styles for logo here */
    }

    To add a style to the logo with the element IS sticky, you can use:

    .sticky-element-original:not('.sticky-element-active') .logo {
        /* Styles for logo here */
    }

    Hope this helps! ??

    Thread Starter mikejandreau

    (@mikejandreau)

    Thanks, but it doesn’t seem to work for me.

    I added

    .sticky-element-original:not('.sticky-element-active') #logo {
        display: none;
    }

    To my CSS to try it out and it doesn’t take effect. Anything I may be missing?

    Here’s the header code from my menu:

    <header id="header-bar">
        <div class="container">
        
     <div class="row">
            <div class="col-md-12">
              <div class="clearfix">
          
                <div id="logo"><a href="#"><img class="img-responsive" src="/images/logo.png" alt=""/></a></div>
                <div class="header-contact">
    • This reply was modified 7 years, 5 months ago by mikejandreau.
    • This reply was modified 7 years, 5 months ago by mikejandreau.

    I’m not really able to see what might be wrong without seeing your site. Any chance you can share a link so I can check it out?

    Thread Starter mikejandreau

    (@mikejandreau)

    It’s still in active dev, so it’s not publicly available yet.

    I can set you up with a login to take a look if you can let me know how to securely get that to you.

    Thanks for offering to take a look!

    If your site is not public yet, you can install a plugin to hide your site behind a password (I usually use a plugin that sets a password on the entire site (such as Password Protected) and send me the address/password to marksenff at Gmail.

    Please do NOT send me a username and password to log in to your site as an editor, contributor, admin, etc. To avoid any risks that I could accidentally break your site, I will not use this. I will only use passwords that will give me access to the front end part of your site.

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Possible to change content on stick?’ is closed to new replies.