Effects & DesignElementor

Elementor Hover To Change Container Background Image

Tools and Links Used

Bluehost WordPress hosting with a free domain included.
Get Hosting
Elementor The free page builder this tutorial is built with.
Get Elementor
Elementor Pro The Pro upgrade used throughout this tutorial.
Get Elementor Pro
Kitpapa Ready made Elementor template kits.
Get Templates

Prompt Used in This Tutorial

Content Show/Hide CSS
selector{
    --text-position: -500px;
    --heading-position: -50px;
    --button-position: 70px;
}

selector, selector .single-card p, selector .single-card a, selector .single-card h2{
    transition: .5s all ease-in-out;
}
selector .single-card p, selector .single-card a{
    position: relative;
    bottom: var(--text-position);
}
selector .single-card a{
    transition: 0.5s all linear;
    position: relative;
    top: 500px;
}
selector .single-card:hover p, selector .single-card:hover a{
    bottom: 0px;
}
selector .single-card:hover a{
    top: var(--button-position);
}
selector .single-card h2{
    position: relative;
    bottom: var(--heading-position);
}
selector .single-card:hover h2{
    bottom: 0px;
}
Image Changing JS Snippet
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script type="text/javascript">
var $ = jQuery;

//Image One
var ImgOne = "url(https://kitpapa.net/etricks/wp-content/uploads/2023/05/Cardio-Jim-Fahad-Digital.jpg)";

//Image Two
var ImgTwo = "url(https://kitpapa.net/etricks/wp-content/uploads/2023/05/Lifting-Jim-Fahad-Digital.jpg)";

    $(document).ready(function(){
        
    $('#card-one').hover(function(){
        $('#main-parent').css("background-image", ImgOne)
    }, function(){
        $('#main-parent').css("background-image", "")
    });
    
    $('#card-two').hover(function(){
        $('#main-parent').css("background-image", ImgTwo)
    }, function(){
        $('#main-parent').css("background-image", "")
    })
    
    
    })
</script>

Get Your FREE Freelancing Roadmap

Stop hopping between tutorials. Grab the Freelancing Mastery Handbook to learn how to choose a skill, build your foundation, find clients, and confidently start your freelancing journey.

Free eBook Download

Related Tutorials

From learning the right skills to building a stronger digital presence, we help you turn ideas into practical, professional results.

Vibe Code a REAL Animated WordPress Website with Claude + Elementor

21.8K views

View Tutorial

Vibe Coding Full Course for Beginners – Build & Launch a Real SaaS

3.3K views

View Tutorial

Edit Videos with ChatGPT Codex — Raw Clips to Finished Reel

3.4K views

View Tutorial

Browse All Tutorials