Jump to content

Button Using Javascript

Recommended Posts

Can anyone help me - when my you click a "button" on my website, I need it to go to a scheduling widget. Our scheduling software provides the information below. I would also like to add the chat function. Please help!

 

Web Widget Setup:

jQuery is a required dependency and must be included before you include the widget script.

(1) Header ScriptInclude this script in the html <head> of your webpage with "YOURTOKENHERE" being replaced with your atme API header generated below. <script data-name='atme-auth' data-token='YOURTOKENHERE' src="https://atme-cdn.s3-us-west-2.amazonaws.com/widget/widget.js" type="text/javascript"></script>
(2) Chat Widget WrapperInclude this div anywhere in the body of your webpage, do NOT put any elements within this div. <div id="atme-widget"></div>
(3) Create Scheduler TriggerWe allow you to set your own element as the trigger to pop up the kiosk modal, include the specified href in the example:  <a class="btn" href="#atme-scheduler">Scheduler button</a>
Link to comment
  • Replies 3
  • Views 1.4k
  • Created
  • Last Reply

Top Posters In This Topic

What part are you stuck on?

  1. put your unique token in to replace YOURTOKENHERE and pace that entire code into the Header Code Injection 
  2. Place this below the previous code in the Header Code Injection
  3. Add a code block and add this code, change the label 'Scheduler Button' to some better text.

You may also need to add this at the top of the Header Code Injection:

<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment
On 11/4/2023 at 5:05 PM, HouseOfStash said:

What are you referring to when you say: change the label 'Scheduler Button' to some better text.

When you see the button on the page you don't need it to say "scheduler button" most people would go for "schedule now" or just "schedule", the word button is in my opinion not needed.

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.