Click Button to Change Image using Elementor

				
					.cars{
    display: none;
}
#carone{
    display: block;
}
				
			

<script src=”https://code.jquery.com/jquery-3.6.0.min.js”></script>

<script>

var $ = jQuery
$(document).ready(function(){
$(‘#red ‘).on(‘click’, function(){


$(‘.cars’).hide()
$(‘#carone’).show()
});
$(‘#blue ‘).on(‘click’, function(){


$(‘.cars’).hide()
$(‘#cartwo’ ).show()
});
$(‘#black’).on(‘click’, function(){


$(‘.cars’).hide()
$(‘#carthree’ ).show()
})
})
</script>

				
					

				
			

Leave a Comment

Your email address will not be published. Required fields are marked *