Skip to content

Releases: WickyNilliams/headroom.js

Support for multiple classes

17 Jan 20:27
Compare
Choose a tag to compare

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

17 Jan 20:22
Compare
Choose a tag to compare

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

09 Oct 11:59
Compare
Choose a tag to compare

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
}