Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi there,

I'm currently building a WordPress website for a company which takes bookings for appointments. To cut a long story short they use a service called 'Timely' to manage their appointments. Timely make a plugin for WordPress so you can integrate the booking process right into a website in the form of a button which once pressed loads a lightbox style element to take people through the booking process.

What I'm trying to do is to bypass this button as I don't like its appearance and they've made it impossible to change with CSS.

I should mention that the website is built with visual composer which takes care of the page layouts and elements. I've created a button with the correct styling, however, I'd now like to use this button to launch the Timely booking process.

I've never really had much experience with Javascript before but somehow I think I need to get this newly created button to run the same script that the timely button runs can anyone help?

This is a page with both buttons on for example: View Page

The top button is the Timely generated one and the below that is the styled button visual composer creates which is what I want. I want that button to perform the same action as the timely button does once clicked.

What I have tried:

I've tried onclick actions however I wasn't entirely sure if I was doing it right.
Posted
Updated 5-Jul-18 4:02am
v3
Comments
F-ES Sitecore 5-Jul-18 10:29am    
Chances are their script creates the button so you can't control that. If I was you I'd try just hiding their button when the page loads, or putting the button in a hidden div so it never shows when it is built. Then you can instigate the booking process via the click event of your own button using the "start()" method of their button as per the timely documentation.
Member 13899866 5-Jul-18 10:32am    
Yeah, I think that too! I've tried adding an onlick action to my own button according to the Timely javascript document which they say is 'booking.start();' but that didn't work either.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900