JSFiddle - React, Tailwind, and code Playground
by Michael Lajlev
JavaScript
// Level 5
// Click
$('p').click(function(){
$(this).hide();
});
/* hover difficult
$('p').hover(
function(){
$(this).addClass("hl");},
function(){
$(this).removeClass('hl');}
);
*/
// hover easy to toggle class
$('p').hover(
function(){
$(this).toggleClass('hl');
}
);
$('body').keypress(
function(){
if(event.which == 102) {alert("I'm awesome!")};
}
);
/*
// Level 4 add, move and remove content
append();
prepend();
before();
after();
text();
html();
hide();
show();
remove();
*/