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

Slider count problem #14

Closed BeatLaG closed 10 years ago

BeatLaG commented 10 years ago

Hi!

I´m having a problem with a slider and background-check. I´m using background check for a main navigation that is placed over a slider.

The plugin works really great adding the handler classes to manage the styles for each case/image/slide. But for some reason it stops working after the 5th slide. It looks like that the plugin has some difficulties after this slide. Is there some limitation in this sense?

I have tried to modify the threshold, maxDuration & minComplexity props. in case some of them could be the problem, but they are not. The same images that don´t fire the classes after the 5th slide are working perfectly when I set them at first place within the slider.

The slider in use is Royal Slider and I´m using the BackgroundCheck.refresh(); method after each slide is loaded. As I say, it is working perfectly, but after the fifth slide the plugin stops firing the classes.

Hope you can send some light about this! Really, this is a very nice plugin!!

Thank you very much for your attention, Beat.

kennethcachia commented 10 years ago

Hi! Glad you find BackgroundCheck useful!

The plugin does not have limitations on the number of slides and I've just tested it with 10+ slides and works fine.

Do you have an online version I can test? I would like to look into this.

Thanks, Kenneth

valentinalisch commented 10 years ago

I'm seeing the same behavior with royalSlider and BackgroundCheck. BackgroundCheck is fired after each slide change, but after the 2nd slide no classes are added anymore. It doesn't throw any error message either.

Online version can be found here: http://backup.valentinalisch.de/desiion.de-2/

kennethcachia commented 10 years ago

Are you still experiencing this issue?

I tested the page on both Chrome and Firefox and the Nav + Menu icons are changing color. I went through all the slides a couple of times and seems to work.