Releases: WickyNilliams/headroom.js
Releases · WickyNilliams/headroom.js
Support for multiple classes
This release adds support for multiple classes. This can be of particular use when using atomic CSS classes.
To use, pass a string with a space-separated list of classes in your options:
const hr = new Headroom(element, {
classes: {
pinned: "first-class second-class",
unpinned: "third-class fourth-class"
}
});
hr.init();
v0.10.4
This release fixes a bug where classes such as top
were not added when Headroom is initialised, only after the user first scrolls.
v0.10.3
This release contains a breaking change for IE11, with the introduction of Object.assign
.
Please be aware this needs to be polyfilled if you wish to support IE11. Alternatively, you can wrap your initialisation code in a condition to avoid instantiation on unsupported browsers:
if(Headroom.cutsTheMustard) {
// initialise headroom
}