Closed hj8ag closed 8 years ago
Issue resolved - had an error in my javascript which I've fixed! For anyone wondering, I simply added
document.addEventListener('DOMContentLoaded', function () {
BackgroundCheck.init({
targets: '.name, .logo, .desktop-nav, .right-nav, .mobilemenu span, .mobilemenu span:before, .mobilemenu span:after, .mobilemenu--htx'
});
});
to the bottom of the script and removing the other instance I had...
Hi,
I'm having a problem with the script throwing up an error - I'm currently implementing it on a test site, located here.
I'm trying to check three different targets against a bunch of images that are loaded into the page in a masonry layout. The three targets are
'.name logo, .rightnav, .mobilemenu mobilemenu--htx'
In my console I'm getting an error 'Uncaught Elements not found' and delving into this further I'm getting an 'anonymous function' on the line where I call the script. I've tried to just target one element, but no joy. Where am I going wrong?
My Javascript is as follows: