kennethcachia / background-check

Automatically switch to a darker or a lighter version of an element depending on the brightness of images behind it.
http://kennethcachia.com/background-check/
MIT License
3.27k stars 282 forks source link

Using with FullPage.js #103

Open CamDuncalfe opened 7 years ago

CamDuncalfe commented 7 years ago

I'm trying to use background check with FullPage.js Here's what my code looks like: afterRender: function(){ BackgroundCheck.init({ targets: '.site-header', images: '.project' }); }, onLeave: function(index, newIndex, direction){ BackgroundCheck.refresh(); } I can't figure out how to get the BackgroundCheck.refresh(); to work when the section changes. Any ideas?

Here's my site

slaughtr commented 7 years ago

Seems a bit late, as I don't think you're using this script anymore, but my guess would be the multiple instances of '.project' that you have on the site?

Were you getting any console logs?