JSFiddle - React, Tailwind, and code Playground

by pmatseykanets

HTML

<h1>My Diary Entries</h1>
    <section class='entries'>
      <article>
        <h2>Wrote my first mobile application</h2>
        <p>
          Today I wrote my first mobile application. It was great! I had huge amounts of fun, it was
          a lot easier than I expected, and I was so happy I spent the rest of the day celebrating.
        </p>
      </article>
      <article>
        <h2>Wrote another mobile application</h2>
        <p>
          I am on such a roll with these mobile Web applications that I went crazy and wrote a second
          one. I am so happy I cannot stop singing at the top of my lungs. My cat seems worried that
          I've finally lost it completely, but I don't care — it's mobile Web all the way from now on!
        </p>
      </article>
      <article>
        <h2>Must stop writing mobile applications</h2>
        <p>
          My fingers are sore from writing so many great mobile Web applications. I know that I should
          stop and take a break, but there are so many great things to do with this technology that I
          really don't know how to stop!
        </p>
      </article>
    </section>

CSS

h1 {
    background: red;
    padding: 0.8em;
}
h2 {
    background: green;
    padding: 0.8em;
}

JavaScript

$(function(){
    $("article").click(function(){
        $(this).find("p").toggle();
    });
});