JSFiddle - React, Tailwind, and code Playground
by vikaskbh
HTML
<div id="container"></div>
CSS
#container {
background-color: #ff820a;
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 mobileLib = {
init: function () {
this.screenwidth = "320px";
this.render();
this.utli();
},
render: function () {
$('#container').css("width", this.screenwidth).html("Mobile Render");
}
};
$(document).ready(function () {
mobileJS = $.extend(true, Core, mobileLib);
mobileJS.init();
});