Display random buttons in a section.
- 0.1.0
- 7.1
- Yes
-
Squarespace plan that supports JavaScript.
-
Add the following to Website > Pages > Website Tools > Code Injection > HEADER.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
-
Add code from file button block replace random.html to Page Settings > Advanced > Page Header Code Injection for the page. Please see Per-page code injection.
-
Buttons
-
Destination
The destination buttons are the buttons that will be replaced by randomly selected source buttons.
-
Add button blocks to a section. There is no need to customize the buttons, other than their placement, as they will be replaced with source buttons.
-
Add a code block with the following code to the same section.
<twc-bbrr data-destination/>
-
-
Source
The source buttons are the buttons that will be selected randomly to replace the destination buttons.
-
Add a section at the bottom of the page.
-
Add a code block with the following code.
<twc-bbrr data-source/>
-
Add your button blocks.
-
-
This effect is not active in SS Preview to test it use private browsing.
Please consider making a donation.
-
2023-09-23
- initial version