I’m looking for the jquery code that allows me to place "call" or "show number" on my elementor button because I need to hide the number.
like houzez does
I already have an old code that allows me to display a section and delete the button.. not very practical as an idea ..
I need to understand how to adapt it to just hide the number with text
I’m not comfortable with jquery there must be a better tip.
/*Remove Button After Show*/
jQuery(document).ready(function($){
$("#MY_BTN").click(function(){
$('#hide_content').slideToggle('250','swing','hide');
this.remove();
});
});
2
Answers
There is plenty of ways to do it. I would do something simple like the following.
When clicking the button, the text will be changed to what is in the
data-text
attribute.HTML:
JS:
You can try this. tested with jquery version 3.6.
When click on button the number will show.