JSFiddle - React, Tailwind, and code Playground
by vikaskbh
HTML
<div id="container"></div>
CSS
#container {
background-color: #4AB348;
width: 100%;
font:normal 13px/18px verdana, arial, sans-serif;
min-height:100px;
border-radius:5px;
padding:5px;
}
JavaScript
var Core = {
screenwidth: "1024px",
init: function () {
this.render();
},
render: function () {
$('#container').css("width", this.screenwidth).html("Default Render Function");
},
utli: function () {
$('#container').append("<p>Core utility function Called</p>");
},
};
var desktopLib = {
init: function () {
this.screenwidth = "600px";
this.render();
this.utli();
},
render: function () {
$('#container').css("width", this.screenwidth).html("Desktop Render");
}
};
$(document).ready(function () {
desktopJS = $.extend(true, Core, desktopLib);
desktopJS.init();
});