Show and Hide containers on click in Elementor with jQuery and CSS

Facebook
Twitter
Reddit
WhatsApp

CSS

				
					.great-container, .bad-container{
    display: none;
}
				
			

jQuery

				
					<script>
    const $ = jQuery;
    // Button Variables 
    const greatBtn = $('.great-btn');
    const badBtn = $('.bad-btn');
    // Container Variables 
    const rateBox = $('.rate-container');
    const greatBox = $('.great-container');
    const badBox = $('.bad-container');
    
    // Show the great form and hide the rating container
    greatBtn.click(() => {
        greatBox.show();
        rateBox.hide();
    });
    
    // Show the bad form and hide the rating container
      badBtn.click(() => {
        badBox.show();
        rateBox.hide();
    })
    
</script>
				
			
Subscribe
Notify of
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

More to explorer

Elementor Multi-Column Dropdown

https://youtu.be/72L8eLoIrCU Target all dropdown menus @media(min-width:767px) { /* When hovering over a menu item that has children, display its submenu as a

0
Would love your thoughts, please comment.x
()
x

45 Minute Wordpress Support

Get your Wordpress questions answered and your Wordpress issues resolved.