Hi, thanks for trying my plugin. 🙂
Without seeing your site, I won’t be able to tell you for sure which selector you need to use, but in general, you could try .sticky-element-original:not('.sticky-element-active') in order to target the element when it’s sticky.
Thread Starter
Eve Fo
(@eve-fo)
Dear Mark
Thank you for your answer. unfortunately that doesn’t work.
The website is https://everontravel.ch/ and the sticky part is the main menu (selector #main-menu)
Thanks for your help
Eve
Apologies for the delay!
From what I can see, you already managed to make it work through another method. Is that correct or do you still need help with this?
I don’t think that the :not() selector is supported when you chain CSS classses.
It would be extremely useful to be able to select an active sticky element. Perhaps the “sticky-element-active” class could be changed to “.sticky-element-stuck” (or similar) so that the element could easily selected. It’s something I would find very useful right now!
-
This reply was modified 9 years ago by
iantresman.
I think this does the trick:
.sticky-element-active + .mySelectorName
> It would be extremely useful to be able to select an active sticky element. Perhaps the “sticky-element-active” class could be changed to “.sticky-element-stuck” (or similar) so that the element could easily selected. It’s something I would find very useful right now!
Definitely a great idea — I’m going to enable something like this in the next update of the plugin. 🙂