#94 - Establecer atributo href

Establecer dinámicamente un enlace utilizando el Webflow CMS (o cualquier otra cosa)

Video Tutorial

Loom
tutorial.mov

Watch the video for step-by-step implementation instructions

The Code

10 lines
Paste this into Webflow
<!-- 💙 MEMBERSCRIPT #94 v0.1 💙 SET HREF ATTRIBUTE -->
<script>
window.onload = function(){
  var elements = document.querySelectorAll('[ms-code-href]');
  elements.forEach(function(element) {
    var url = element.getAttribute('ms-code-href');
    element.setAttribute('href', url);
  });
};
</script>

Script Info

Versionv0.1
PublishedNov 11, 2025
Last UpdatedNov 11, 2025

Need Help?

Join our Slack community for support, questions, and script requests.

Join Slack Community
Back to All Scripts

Related Scripts

More scripts in UX