This article explains how to make a new element appear when an existing element is selected, for single and multiple events, in Subscribe.
Single Event
- Select the section of the page where you want a new element to appear as a click event
- Navigate to the gear icon in the right hand sidebar
Set "Id" to an easily identifiable token that describes the click event content, such as "price" or "terms"
- Select the clickable element you would like to add the click event to, and again navigate to the gear icon in the right hand sidebar
For Text:
- In the input box labeled "Click Event", insert the following text: setText(‘Token Name’, ‘Click Event Content.’);
- Replace "Token Name" with the easily identifiable token you chose in step three
- Replace "Click Event Content." with the text you would like to appear
NOTE: Ensure all ‘ marks are in place as a missing ‘ mark will prevent the click event from initiating
For HTML:
- In the input box labeled "Click Event", insert the following text: setHtml(‘Token Name’, ‘Click Event Content.’);
- Replace "Token Name" with the easily identifiable token you chose in step three
Replace "Click Event Content." with the content you would like to appear. If this is an image, insert the image HTML. If this is formatted text, insert the HTML of formatted passage.
NOTE: Ensure all ‘ marks are in place as a missing ‘ mark will prevent the click event from initiating.
NOTE: If the content contains any ‘ marks in addition to the opening and closing marks, they MUST be immediately preceded by a \ (backslash).
Multiple events
To have more than one click event, follow steps 1-4 above, for the additional areas you would like to populate, then:
- Navigate back to the Click Event box and insert the following text after the last line of current text: setText(‘Token Name’, ‘Click Event Content.’); OR setHtml(‘Token Name’, ‘Click Event Content.’);
- Update placeholders to contain click event information
Save changes