Skip to content

Support for multiple classes

Latest
Compare
Choose a tag to compare
@WickyNilliams WickyNilliams released this 17 Jan 20:27
· 3 commits to master since this release

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();