Jump to content

Adding script to button in header.

Recommended Posts

Hi,

on www.hiddengallery.cz I have managed to add a button called: Showroom appointment.
When you click on it there is a page with a text: Click here to schedule your appointment at HIDDEN. 
If you click on the text pop-up with calendly will show up. 

What is in my mind is to be able get to calendly pop-up right after I click on the button  Showroom appointment from where ever I'm on my site. 

Is this possible with code injection?

thanks, 

 

 

Link to comment
7 hours ago, FilipKar said:

Hi,

on www.hiddengallery.cz I have managed to add a button called: Showroom appointment.
When you click on it there is a page with a text: Click here to schedule your appointment at HIDDEN. 
If you click on the text pop-up with calendly will show up. 

What is in my mind is to be able get to calendly pop-up right after I click on the button  Showroom appointment from where ever I'm on my site. 

Is this possible with code injection?

thanks, 

 

 

https://test-circle.squarespace.com/

password: demo

Check the book now button. Let me know if you want it.

Screenshot_31.png

If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks

MD Rofik
Website Designer and Digital Marketer

Am I helpful? Want to offer me a coffee?
Send me a message if needed any help. I'll try to reply as soon as possible.


 

Link to comment
2 hours ago, FilipKar said:

Hi, this looks amazing. Is it possible do it with calendly?

 

thanks, 

https://test-circle.squarespace.com/

check now if it work.

If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks

MD Rofik
Website Designer and Digital Marketer

Am I helpful? Want to offer me a coffee?
Send me a message if needed any help. I'll try to reply as soon as possible.


 

Link to comment
  • 3 weeks later...

Thanks to the guy Web_Solutions and ChatGPT combo.

 

<!-- Calendly link widget begin -->
<link href="https://assets.calendly.com/assets/external/widget.css" rel="stylesheet">
<script src="https://code.jquery.com/jquery-3.6.3.min.js"></script>
<script src="https://assets.calendly.com/assets/external/widget.js" type="text/javascript" async></script>

<script>
  $(function(){
    $(".header-actions-action .sqs-button-element--primary").attr("onclick","Calendly.initPopupWidget({url: 'https://calendly.com/hiddengallery/120min?hide_event_type_details=1&hide_gdpr_banner=1'});return false;");
    $(".header-menu-cta .sqs-button-element--primary").attr("onclick","Calendly.initPopupWidget({url: 'https://calendly.com/hiddengallery/120min?hide_event_type_details=1&hide_gdpr_banner=1'});return false;");
  });
</script>

 

Edited by FilipKar
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.