Elementor click to change image

 Preview

Elementor click to change image

WordPressElementor click to change image.

Features 
🔸Fully customizable 
🔸Responsive 
🔸CSS code

Tutorial link:

☑️Support me on Patreon



code:
<style>
    .cars{
        display: none;
    }
    #car-1{
        display: block;
    }
</style>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script>
var $ = jQuery
$(document).ready(function(){
  
        var x = document.getElementsByClassName("car-button");
        
   
var buttonsCount = x.length;
for (var i = 0; i <= buttonsCount; i += 1) {
    x[i].onclick = function(e) {
        
        $('.cars').hide();
        $('#car-' + this.id).show();
    };
}
})
</script>



Comments

  1. Hi, how to use icons, not buttons? I try to add svg icons, but when load first icon, any others is the same (not show diferent uploaded icon !?)

    ReplyDelete
    Replies
    1. Sorry for the late, Just do the same process as a button and make sure id and class have the same name as code. sometimes inside elementor tab you cannot see changes so please use the preview to view updates.

      Delete

Post a Comment