Headroom.js and ie9 support

I am using Headroom.js and I need IE9 support. The website ( http://wicky.nillia.ms/headroom.js/ ) says that I need to use a polyfill:

Headroom.js browser support depends on the following browser APIs:

requestAnimationFrame classList Function.prototype.bind

All of these APIs can be populated, so headroom.js can work with less reliable browsers if needed. Check the linked resources above to determine if you should polyfill achieve your desired level of browser support.

But with these polyfills, Headroom still doesn't work in IE9. I'm a newbie and I think there is something wrong with classList. Since these classes don't show up in IE9:

classes: {pinned: "headroom - pinned", unpinned: 'headroom - unpinned', top: 'headroom - top', notTop: "height - not top", initial: "headroom"}

Ps sorry for my english.

+3


source to share


2 answers


Be sure to load all your polyfills before any other scripts. It sounds like you might be linking to them too late and therefore not using them.



0


source


Try using the cross browser class



https://github.com/eligrey/classList.js

+1


source







All Articles