JSFiddle - React, Tailwind, and code Playground
by L_Robin
HTML
<script src="http://www.algodok.com/AlgoDok.js"></script>
<div id="toto">
<p>Un paragraphe.</p>
<p>Un autre paragraphe.</p>
</div>
CSS
p.invisible + label:before { content : ' ' ; display:block }
JavaScript
contrôleur_de_paragraphe =
'<label>Afficher le paragraphe</label>\
<input type="checkbox" checked \
onclick="piloter(le.successeur.de(this)).via(this)"/>';
contrôler = function()
{ insérer (un.contrôleur_de_paragraphe) .avant (tout('p').de(toto)) };
piloter = function(e) { piloter.e = e ; return piloter };
piloter.via = function(i)
{ classer(piloter.e).selon(i.checked).comme('visible') };
attendre('AlgoDok.est("chargé")').pour(contrôler);