Created
December 23, 2020 18:21
-
-
Save ChrisDrit/00b00a8117346d864aa2b16a0e305a33 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Webflow = Webflow || []; | |
Webflow.push(function() { | |
MemberStack.onReady.then(function(member) { | |
// handle the link click yourself | |
function triggerClick(event) { | |
event.preventDefault(); | |
window.location.assign("https://website.com?id=" + member.id); | |
} | |
// replace this with the ID for | |
// your Webflow text link element | |
const myLink = document.getElementById('link-id'); | |
// capture link click | |
myLink.addEventListener('click', triggerClick); | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment