Onclick code for Basel button
-
Hello,
Where can we add on click code for the Basel button on the page builder?
Thanks
Hello,
I am not sure I got your idea, however as far as understand your question, you can find the button in the Theme elements tab. https://xtemos.com/docs/basel/shortcodes/
Best Regards
Hello,
Sorry I was not very clear with my previous message.
I have the Tidio live chat widget installed on the website and I would like to add the following code to the Basel theme element button so that when the button is clicked it opens the Tidio chat widget:
window.tidioChatApi.show(); window.tidioChatApi.open();
The standard WPBakery button element has an option for adding javascript code executed when the button is clicked. See screenshot here – http://prntscr.com/uqu5op
How can I do this with the Basel theme button element?
Hello,
Please create a button from WP Bakery page builder and insert a class as it is: tidio-button
http://prntscr.com/ur1782
Then add this code to the Theme Settings > Custom JS > On document ready https://prnt.sc/ur17fw :
jQuery('.tidio-button').on('click', function(){
window.tidioChatApi.show();
window.tidioChatApi.open();
});
Best Regards