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

amended windowEvents param setup #9

Closed HaykoKoryun closed 10 years ago

HaykoKoryun commented 10 years ago

Fixed an issue with the windowEvents parameter setup. When init was called with windowEvents:false it would be turned into true using the || operator.

kennethcachia commented 10 years ago

Good catch, thanks! Added more checks in case attribute values change in the future.