v0.1

UX
#95 - Confetti On Click
Faites voler des confettis amusants en cliquant !
Créez un bouton qui peut effacer les valeurs d'une ou plusieurs entrées.
Watch the video for step-by-step implementation instructions
<!-- 💙 MEMBERSCRIPT #78 v0.1 💙 CLEAR INPUT VALUES ONCLICK -->
<script>
document.addEventListener('DOMContentLoaded', () => {
const clearBtns = document.querySelectorAll('[ms-code-clear-value]');
clearBtns.forEach(btn => {
btn.addEventListener('click', () => {
const fieldIds = btn.getAttribute('ms-code-clear-value').split(',');
fieldIds.forEach(fieldId => {
const input = document.querySelector(`[data-ms-member="${fieldId}"]`);
if (input) {
input.value = '';
}
});
});
});
});
</script>vraiAdd these data attributes to your HTML elements in Webflow. For example: <div data-attribute="value">
More scripts in UX