loader image

Flipcard Background Changer

Flipcard Background Changer

This example uses an Image thumbnail button to select panel content within a column and change page background colour on each selection

4/5 - (1 vote)

Template Example

Flip Cards

bouys

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

CREDIT Jim Fahad
CSS NEEDED

Atribute


selector{
cursor: pointer;
transition: 0.5s;
}
selector:hover{
transform: translateY(-12px)
}

------------------------

 

data-jim|https://robedge.com/wp-content/uploads/2022/09/eastCardinal.jpg
data-color|#000000

HTML NEEDED

<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script type="text/javascript">
var $ = jQuery;
$(document).ready(function(){
$('[data-jim]').on('click', function(){
var jim = $(this).attr('data-jim')
var bColor = $(this).attr('data-color')
$('.flipcard img').attr('src', jim ).attr('srcset', '')
$(".flipcard-section").css("background-color", bColor);
})
})
</script>

robedge.com | mt irvine tobago w.i. | 868.276.2665 | robedge@gmail.com