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

TypeError: d.replace is not a function #43

Closed rogerburkhard closed 9 years ago

rogerburkhard commented 9 years ago

Hi,

thanks for this great Script! Unfortunately I have a problem to use it on a Wordpress Page. I'm getting the following Error in the Console:

Chrome: Uncaught TypeError: undefined is not a function FF: TypeError: d.replace is not a function ...new RegExp("(?:^|\s)"+b+"(?!\S)","g");d=d.replace(e,"")}a.className=d.trim()}f...

Thanks for your help.

kennethcachia commented 9 years ago

Hi!

Do you have a test site I can check?

kennethcachia commented 9 years ago

I'm closing this issue, but please feel free to reopen if you have additional info.

chriseugenerodriguez commented 8 years ago

got same issue http://demo.premiumwd.com/themes/ellion/portfolio/smoke/

code:

if($('#theme-wrapper').hasClass('fullscreen')){ BackgroundCheck.init({ targets: "header .logo h1, header #mobile-nav svg, #theme-wrapper.fullscreen .slick-dots li", images: ".full-width-container.carousal.slick-slider .slick-slide img", minComplexity: 80, maxDuration: 1500, minOverlap: 0 })
}