Jump to content

MarcLee0807

Member
  • Posts

    1
  • Joined

  • Last visited

Reputation Activity

  1. Like
    MarcLee0807 reacted to creedon in Adding custom code to a button   
    It appears you may be using some Javascript in your site? Are you on the business plan or above?
    If yes on the business plan. I suggest using a standard SS button block and then using some Javascript to add the needed class.
  2. Like
    MarcLee0807 reacted to creedon in Adding custom code to a button   
    Add the following to Page Settings > Advanced > Page Header Code Injection for the page.
    <script>   /*        begin add class(es) to button          Version    : 0.1d0          SS Version : 7.1          By         : Thomas Creedon < http://www.tomsWeb.consulting/ >          */          // enter button block id without the #          const buttonBlockId = '[enter button block id without the # here between single quotes]';          // do not change anything below, there be the borg here          window.addEventListener ( 'DOMContentLoaded', ( ) => {            document.querySelector ( '#' + buttonBlockId + ' a' )                .classList                  .add ( 'button', 'wt-embed--trigger' )                } );            /* end add class(es) to button */        </script> Let us know how it goes.
×
×
  • 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.