JSFiddle - React, Tailwind, and code Playground
by Town
HTML
<li class="helpList">
<a href="#">
<img src="/images/collapse.png" class="helpToggle" alt="Contraer" />How do I do stuff?</a>
<div class="helpContent">To do stuff, please do something.</div>
</li>
CSS
.helpContent {display: none;}
JavaScript
$('li.helpList a').click(function() {
var anchor = this;
$(this).next().slideToggle("fast", function() {
$('img', anchor).attr("src", "http://www.christownsend.com/images/superdog.jpg");
});
});