<section id="transform-scale" class="animate-things-wrapper">
<button id="trigger">Trigger</button>
<div id="box" class="box">
Hi there
</div>
</section>
<script src="../../js/components/transform-scale.js"></script>
<section id="transform-scale" class="animate-things-wrapper">
<button id="trigger">Trigger</button>
<div id="box" class="box">
Hi there
</div>
</section>
<script src="{{ path '/js/components/transform-scale.js' }}"></script>
/* No context defined. */
(function () {
document.addEventListener('DOMContentLoaded', function () {
console.log("transform-scale active");
const button = document.querySelector('#trigger');
const box = document.querySelector('#box');
button.addEventListener('click', function() {
box.classList.toggle('active');
})
});
})();
#transform-scale {
.box {
transform: scale(1, 1);
transition: transform 0.25s ease-in-out;
&.active {
transform: scale(1.75, 1.75);
}
}
}
No notes defined.