• Resolved yalondpsi

    (@yalondpsi)


    Hi
    My theme (Divi) slider presents images with css style background-image:url(…)
    so when I press on the gray button nothing happened. I added few jQuery lines to your code under:

    jQuery(".greyscale").click(function(){
        
            jQuery("img").each(function(){
                jQuery(this).toggleClass("active_greyscale");
            });

    this are the lines I ask you to add:

    jQuery('*').filter(function() {
            if (this.currentStyle) 
                    return this.currentStyle['backgroundImage'] !== 'none';
            else if (window.getComputedStyle)
                    return document.defaultView.getComputedStyle(this,null)
                                    .getPropertyValue('background-image') !== 'none';
            }).toggleClass('active_greyscale');

    Thanks
    Yalon

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Alex Volkov

    (@vol4ikman)

    Well, thank you for propose, but you code not working =)

    In the next plugin version I’ll add support for background images

    thanks

    Thread Starter yalondpsi

    (@yalondpsi)

    It’s a great plugin, (the code is working here), but of course it’s just a suggestion. Looking forward for the next version:)

    Plugin Author Alex Volkov

    (@vol4ikman)

    Well, in alpha version for the next plugin release, I added background image support for inline css elements. For now I have to test all possible variations…So it will take some time…

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘support for background-image’ is closed to new replies.