Jump to content

Add DonorBox Button To Navigation

Recommended Posts

Posted

Site URL: https://hwh.squarespace.com/

On the website, in the navigation section I would like to add the DonorBox Button Code below. It is a button that opens a pop up box to donate but we want it in the navigation bar instead of the other button. 

@tuanphan please help!! 🙂

Donorbox code button:

<script type="text/javascript" defer src="https://donorbox.org/install-popup-button.js"></script><a class="dbox-donation-button" style="background: #035aa5

url(https://d1iczxrky3cnb2.cloudfront.net/red_logo.png) no-repeat 37px;color: #fff;text-decoration: none;font-family: helvetica;display: inline-block;font-size: 16px;padding: 15px 20px;padding-left: 75px;-webkit-border-radius: 2px;-moz-border-radius: 2px;border-radius: 2px;box-shadow: 0 1px 0 0 #1f5a89;text-shadow: 0 1px rgba(0, 0, 0, 0.3);" href="https://donorbox.org/hwh-donate-now">DONATE NOW</a>

 

 

Screen Shot 2020-12-15 at 12.17.05 PM.png

  • Replies 11
  • Views 1.5k
  • Created
  • Last Reply
  • 8 months later...
Posted

Hi - this is the website:

http://www.thestereotypeproject.org

To: Install a mobile optimized donation popup form

<script type="text/javascript" defer src="https://donorbox.org/install-popup-button.js"></script><a class="dbox-donation-button" style="background: #f9b41f url(https://donorbox.org/images/red_logo.png) no-repeat 37px;color: #fff;text-decoration: none;font-family: Verdana,sans-serif;display: inline-block;font-size: 16px;padding: 15px 38px;padding-left: 75px;-webkit-border-radius: 2px;-moz-border-radius: 2px;border-radius: 2px;box-shadow: 0 1px 0 0 #1f5a89;text-shadow: 0 1px rgba(0, 0, 0, 0.3);" href="https://donorbox.org/the-stereotype-project">Donate</a>

 

To use my own link or button: 

Add a link with a href="https://donorbox.org/the-stereotype-project" and one of the class names should be custom-dbox-popup. Example:

<a class="custom-dbox-popup" href="https://donorbox.org/the-stereotype-project">Donate Now</a>

You can also have a button image inside the link tag. Example:

<a class="custom-dbox-popup" href="https://donorbox.org/the-stereotype-project">
  <img src="https://donorbox.org/images/png-donate/button-medium-blue.png" />
</a>

Add the below two lines of code anywhere in the page, preferably above the closing </head> tag.

<script type="text/javascript" defer src="https://donorbox.org/install-popup-button.js"></script>
<script>window.DonorBox = { widgetLinkClassName: 'custom-dbox-popup' }</script>

 

 

Thanks!

Posted
On 8/31/2021 at 1:15 PM, pavilion said:

Hi - this is the website:

http://www.thestereotypeproject.org

To: Install a mobile optimized donation popup form

<script type="text/javascript" defer src="https://donorbox.org/install-popup-button.js"></script><a class="dbox-donation-button" style="background: #f9b41f url(https://donorbox.org/images/red_logo.png) no-repeat 37px;color: #fff;text-decoration: none;font-family: Verdana,sans-serif;display: inline-block;font-size: 16px;padding: 15px 38px;padding-left: 75px;-webkit-border-radius: 2px;-moz-border-radius: 2px;border-radius: 2px;box-shadow: 0 1px 0 0 #1f5a89;text-shadow: 0 1px rgba(0, 0, 0, 0.3);" href="https://donorbox.org/the-stereotype-project">Donate</a>

 

To use my own link or button: 

Add a link with a href="https://donorbox.org/the-stereotype-project" and one of the class names should be custom-dbox-popup. Example:

<a class="custom-dbox-popup" href="https://donorbox.org/the-stereotype-project">Donate Now</a>

You can also have a button image inside the link tag. Example:

<a class="custom-dbox-popup" href="https://donorbox.org/the-stereotype-project">
  <img src="https://donorbox.org/images/png-donate/button-medium-blue.png" />
</a>

Add the below two lines of code anywhere in the page, preferably above the closing </head> tag.

<script type="text/javascript" defer src="https://donorbox.org/install-popup-button.js"></script>
<script>window.DonorBox = { widgetLinkClassName: 'custom-dbox-popup' }</script>

 

 

Thanks!

and did you solve? or still need help?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.