JSFiddle - React, Tailwind, and code Playground

by pufamuf

HTML

<div id="content">Click button to change content</div>

<input type="button" value="Change" id="buttonone">

<input type="button" value="Change" id="buttontwo">

JavaScript

$("input[type='button']").click(function() {
    switch(this.id) {
        case 'buttonone' : $("#content").html("Content changed");
        case 'buttontwo' : $("#content").html("Content changed again");
    }
});

});