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

Classes not added to element #106

Open heyxmvck opened 6 years ago

heyxmvck commented 6 years ago

Hi all,

Kenneth thanks so much for a great plugin.

I am struggling to get this working though. I have added the classes needed to the target, loaded the scripts and no errors are showing on the consoles. all the images are hosted within our own server, however it is loaded dynamically (wordpress)

here's the markup - images with .roll-image class

screen shot 2018-05-10 at 7 25 55 pm

the target element - scrolled over the images

screen shot 2018-05-10 at 7 28 57 pm

scripts for background-check

screen shot 2018-05-10 at 7 30 17 pm screen shot 2018-05-10 at 7 30 51 pm

where did i go wrong :/

any help would be greatly appreciated!

many thanks

Mick

heyxmvck commented 6 years ago

Sorry i pressed submit too early.

I checked the element and took out the links, and it works!

so i guess the question now, how do i make it work and keep the image wrapped in a link?