Snippets / HTML
HTML
Toggle Phone Number with Button
D
Donald McGuinn
·
416 views
·
Updated 2 years ago
This code will allow you to create a button, and toggle the phone number with the click. Aside from the script below, be sure to add the class "phone-number" without quotes to your widget that has the class assigned to it. Action list widget does not allow a per action class yet so it will not work with an action widget with more than one action.
Add all of this to a single HTML widget
Show Phone Number
.phone-number {
display: none; /* Hide initially */
}
jQuery(document).ready(function($) {
$('.show-phone-btn').on('click', function() {
$('.phone-number').toggle(); // Toggle visibility of phone number
});
});
HTML · 11 lines
Discussion 2
Ask a question or share how you used this.
Log in
to join the discussion.