JSFiddle - React, Tailwind, and code Playground
by StormMan
HTML
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
<div class="myelement"><button>
Toggle
</button>
<p>
This is the paragraph to end all paragraphs. You
should feel <em>lucky</em> to have seen such a paragraph in
your life. Congratulations!
</p></div>
<div class="myelement"><button>
Toggle
</button>
<p>
This is the paragraph to end all paragraphs. You
should feel <em>lucky</em> to have seen such a paragraph in
your life. Congratulations!
</p></div>
<div class="myelement"><button>
Toggle
</button>
<p>
This is the paragraph to end all paragraphs. You
should feel <em>lucky</em> to have seen such a paragraph in
your life. Congratulations!
</p></div>
JavaScript
$( ".myelement" ).click(function() {
$(this).children("p").toggle("fade", 150);
});