sticky.js add a class name is-sticky
when the element change to sticky mode. So you can use it to switch your css properties. I write an example to toggle two menu by the class name. http://jsfiddle.net/cwshp/
<div id="menu">
<div id="static-menu">This is static menu.</div>
<div id="sticky-menu">This is stick menu.</div>
</div>
CSS
html, body{
height: 110%;
}
#menu {
position: relative;
width: 100%;
}
#static-menu {
background-color: green;
}
#sticky-menu {
background-color: red;
opacity: 0;
position: absolute;
top: 0;
width: 100%;
transition: opacity 1s;
-webkit-transition: opacity 1s;
-moz-transition: opacity 1s;
-o-transition: opacity 1s;
}
.is-sticky #sticky-menu {
opacity: 1;
}