Viewing 20 posts - 1 through 20 (of 20 total)
  • Author
    Posts
  • #595079

    I currently have a background image on a ‘color section’. The guy I’m building the site for wants this background to crossfade from one image (black and white), to another (exact same, but in colour), with the content over the top remaining static – so not a slider. Any ideas? This one’s got me stumped.

    #595553

    Nope?

    #595697

    Hi!

    Please edit your Color Section element and give it a unique ID – http://kriesi.at/documentation/enfold/wp-content/uploads/sites/2/2013/12/color-section-ID.png and then add following code to Quick CSS in Enfold theme options under General Styling tab

    #your-custom-id:hover .av-parallax-inner { background-image:url(https://kriesi.at/wp-content/themes/kriesi/images/logo.png)!important; }
    #your-custom-id:hover .av-parallax-inner, #your-custom-id .av-parallax-inner { transition: background 0.2s ease-in-out; -webkit-transition: background 0.2s ease-in-out; -moz-transition: background 0.2s ease-in-out; }

    Best regards,
    Yigit

    #596305

    Thanks, I think there was a little misunderstanding there though. If you access the site now you’ll see what happens – the image changes when the cursor is over it.

    What I want to do is make one image load first, then after a couple of seconds, it automatically fades into the other. Is that possible?

    #596471

    Hi!

    I see. Please remove the code i posted above (but please keep the unique ID) and add following code to Functions.php file in Appearance > Editor

    
    function avia_custom_background_change(){
    ?>
    <script>
    jQuery(window).ready(function(){
       setTimeout(function() {
            jQuery("#your-custom-id .av-parallax-inner").css('background-image','url(https://kriesi.at/wp-content/themes/kriesi/images/logo.png)!important');
        }, 5000);
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'avia_custom_background_change');

    It will change background after 5second you can adjust 5000 as needed

    Best regards,
    Yigit

    #596488

    Thanks, that doesn’t seem to work though?
    Alex

    #596502

    Hey!

    Do you mind creating a temporary admin login and posting it here privately so we can look into it?

    Cheers!
    Yigit

    #596505

    Sure!

    #596512

    Hi!

    I adjusted the code in functions.php a little. Please review your website now.

    Best regards,
    Yigit

    #596568

    Hi, thanks for that. It doesn’t fade though. I want a smooth transition over a few seconds, not just one image followed by the other. Think like a slide show with one slide fading into another over a 3 second period.

    Alex

    #597813

    Hi Yigit,

    Have you seen my previous message?

    Alex

    #598430

    Hi!

    I edited the code in Functions.php file (and moved it a little higher), please review your website now

    Regards,
    Yigit

    #598446

    Thanks, is there anyway to make the transition smoother though? For example, at the minute the transition only takes about half a second, we’d prefer it to take about 5 seconds, fading from one image to the other. Sorry for being such a pain!
    Alex

    #601283

    Hey!

    Sorry for the late reply!

    Have you decided to use another way? If you have not, please post the link to your example page and i can take another look :)

    Best regards,
    Yigit

    #601321

    Hi Yigit, no worries. We decided to go with a different concept in the end. You can still help me though – I’m trying to remove the last bit of white from the bottom of this image: http://howard.alexanderfirth.com/brainstorm/

    We want the purple paint to touch the footer. At the minute there’s a small gap. Any ideas?

    Thanks,
    Alex

    #601326

    Hi!

    Please turn on custom CSS field for ALB elements – kriesi.at/documentation/enfold/turn-on-custom-css-field-for-all-alb-elements/ and then edit your column and give it a custom CSS class and then add following code to Quick CSS in Enfold theme options under General Styling tab

    .your-custom-column img { position: relative; bottom: -7px; }

    Regards,
    Yigit

    #601336

    Thanks, but now the gap is just at the top instead :p

    #601339

    Hi!

    Whooopsie! :)
    Please change the code to following one

    .image_page img {
        margin-bottom: -1px;
    }

    Cheers!
    Yigit

    #601346

    #601403

Viewing 20 posts - 1 through 20 (of 20 total)
  • The topic ‘Color section background image crossfade query’ is closed to new replies.