JSFiddle - React, Tailwind, and code Playground
HTML
<div class="js-box">This is here</div>
CSS
*{margin:0px;padding:0;}
.js-box{
width:100px;
height:20px;
border:1px solid red;
}
JavaScript
var myApp = {
e : $('.js-box'),
addStyle : function(){
console.log("Add style called");
myApp.e.css('height','200');
},
warn : function(){
alert('WOOOOOoooOO!!!');
},
runAll : function(){
this.addStyle();
this.warn();
}
};
myApp.runAll();