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

Uncaught Unknown property - windowEvents #22

Closed alexej-d closed 10 years ago

alexej-d commented 10 years ago

Hi, thank you for the great plugin. I just wanted to mention that it is not possible to set windowEvents to false without having countless JS errors. I have been trying to deactivate your plugins resize and scroll detection because I do not need it. Maybe I am doing something wrong?

kennethcachia commented 10 years ago

Hi!

I'm trying the following on this demo page:

BackgroundCheck.set('windowEvents', false);
BackgroundCheck.set('windowEvents', true);

Everything seems to be working fine. Are you using the latest version?

alexej-d commented 10 years ago

Hey, thank you for the quick reply. Yes I am using the newest version with Chrome on Mac OS and the error occured when I initialized the plugin with this setting. But it looks like I cannot reproduce the error at the moment, maybe a false alarm. I will observe my command line and notify you when I am able to recreate the faulty scenario.

kennethcachia commented 10 years ago

No problem! Perfect, let me know.

thomas-harding commented 9 years ago

Hi, I'm also getting this error on the odd time.

It's hard to pin down, but the only times I've noticed it happening is when I load the site for the first time. Refreshing the page stops the error, but say I open it in a different browser window, I get it again.

My console displays this:

57 Uncaught Unknown property - windowEvents background-check.min.js?ver=1.0.0:5 20 Uncaught Unknown property - windowEvents background-check.min.js?ver=1.0.0:5

and then below I get:

z x

krembo99 commented 8 years ago

experiencing the exact same problem here , and as @thomas-harding said, it is only on first load of page . Worth mentioning : 1 - Using ( somewhat old ) Chrome ( 39.0.2171.95 ) 2 - The site has a background slideshow ( and not single image/ Color ) 3 - Localhost . Somehow on a webserver it seems to be ok ( maybe cached ? )

janeschindler commented 6 years ago

I'm getting this too. I agree that it seems to happen sometimes when loading the site for the first time.