JSFiddle - React, Tailwind, and code Playground

by ghazal

HTML

<p class="truc">c'est une autre classe</p>

CSS

p{font-weight: bold; color: green;cursor: pointer;}

JavaScript

window.addEvent('domready',function() {
var foo = $$('.test');
if (foo){
foo.setStyle('opacity', 0.5).addEvents({
    mouseenter: function(){
      this.morph({
        'opacity': 0
      });
    },
    mouseleave: function(){
      this.morph({
        'opacity': 1
      });
    }
});
}
else {
        
                }
});