<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. */
  • Content:
    (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');
        })
      });
    })();
    
  • URL: /components/raw/transform-scale/transform-scale.js
  • Filesystem Path: components/01-basic/05-transform-scale/transform-scale.js
  • Size: 332 Bytes
  • Content:
    #transform-scale {
      .box {
        transform: scale(1, 1);
        transition: transform 0.25s ease-in-out;
    
        &.active {
          transform: scale(1.75, 1.75);
        }
      }
    }
    
  • URL: /components/raw/transform-scale/transform-scale.scss
  • Filesystem Path: components/01-basic/05-transform-scale/transform-scale.scss
  • Size: 165 Bytes
  • Handle: @transform-scale
  • Preview:
  • Filesystem Path: components/01-basic/05-transform-scale/transform-scale.hbs

No notes defined.