yasmikash
-
Posts
2 -
Joined
-
Last visited
Reputation Activity
-
yasmikash reacted to colin.irwin in Executing my javascript code only on a specific page
Here's what you need to do.
First, wrap your code as follows
<script> window.Squarespace.onInitialize(Y, function(){ // Your code here }); </script>
This will execute the code on each page load.
Next, you may need to modify the code so that it only runs for the specific page. You do this by testing the body tag for the presence of the specific collection id.