JSFiddle - React, Tailwind, and code Playground

by sungsoonz

HTML

<body>
  <header>
    <h2 id="title">
      Meepo Brushes
    </h2>
  </header>
</body>

CSS

#title {
  opacity: 0;
  transition: all 1s ease-out;
}

JavaScript

const title = document.getElementById('title');

function showTitle(x) {
	title.style.opacity = 1;
	title.style.marginTop = x + 'px';
  showModal(x);
}

function showModal(z) {
	alert("title was moved by " + z + "px");
}



document.addEventListener('DOMContentLoaded', function() {
    showTitle(100);
}, false);