• On line 106 of kale.js, there is the following line of code:

    
    if(jQuery(item).attr('src').match(/(https?:)?\/\/www\.youtube\.com/)) {
    

    This code will break and cause your images not to load if there is an <iframe> without the src attribute. I fixed this by changing that line to this:

    
    if(jQuery(item).attr('src') != "" && jQuery(item).attr('src').match(/(https?:)?\/\/www\.youtube\.com/)) {
    
    • This topic was modified 6 years, 1 month ago by tino1b2be.
    • This topic was modified 6 years, 1 month ago by tino1b2be.
    • This topic was modified 6 years, 1 month ago by tino1b2be.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi there,

    Thank you for pointing this out. We found this bug on some pages and we’ll fix it as soon as possible.

    The other way to fix it is to use this:

    if(jQuery(this)[0].hasAttribute("src") && jQuery(item).attr('src').match(/(https?:)?\/\/www\.youtube\.com/)) {

    Kind regards

    Thread Starter tino1b2be

    (@tino1b2be)

    Awesome. Thank you! That’s definitely a better way of doing it, I’m not very familiar with JS

    • This reply was modified 6 years, 1 month ago by tino1b2be.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Bug in Javascript that causes images not to load.’ is closed to new replies.