v0.1

UX
#95 - Confetti On Click
Make some fun confetti fly on click!
Display the Webflow "current" state on your nested pages & CMS items.
Watch the video for step-by-step implementation instructions
<!-- 💙 MEMBERSCRIPT #88 v0.1 💙 SHOW CURRENT STATE FOR NESTED URLS -->
<script>
window.onload = function() {
 var currentUrl = window.location.href;
 var elements = document.querySelectorAll('[ms-code-nested-link]'); // get all elements with ms-code-nested-link attribute
 elements.forEach(function (element) {
  var linkAttrValue = element.getAttribute('ms-code-nested-link'); // get the ms-code-nested-link value
  if (currentUrl.includes(linkAttrValue)) { // check keywordif current url matches the attribute value
   element.classList.add('w--current'); // apply the keywordclass
  }
 });
};
</script>More scripts in UX