garand / sticky

jQuery Plugin for Sticky Objects
Other
3.3k stars 1.06k forks source link

add backgroundColor api to enable sticky background-color changed #220

Closed tenghuanhe closed 8 years ago

tenghuanhe commented 8 years ago

Sometimes people want to change the sticky bars' background-color when scrolling to the top. $("#header").sticky({ topSpacing: 0, backgroundColor: '#f8f8f8' }); exposed the backgroundColor api to sticky users.

chesio commented 8 years ago

How is this different than .is-sticky #header { background-color: #f8f8f8; } in your stylesheet?

tenghuanhe commented 8 years ago

@chesio , they are the same and yours is better, thanks and I'll close this PR.