JSFiddle - React, Tailwind, and code Playground
by Shree Khanal
HTML
<div id="mainDesign" style="width:100px;height:100px;border:solid 1px #cccccc;">
<div id="div1" tabindex="1" style="width:30px;height:30px;border:solid 1px #cccccc;margin:10px;outline:0;">
</div>
</div>
JavaScript
$(function() {
$("#div1").focusin(function() {
$(this).css("border-color","red");
});
});
$(function() {
//$("#div1").focusout(function() {
$("#mainDesign").mousedown(function(){
$("#div1").css("border-color","blue");
});
//});
});