<!DOCTYPE html>
<style>
.flex-parent {
display:flex;
width: 100%;
}
.flex-child {
flex:1;
width:100%;
}
.flex-parent div{
width:50%;
}
.flex-parent div textarea{
width:100%;
}
.black {
background-color:black;
}
.red {
background-color:red;
}
.green {
background-color:green;
}
.blue {
background-color:blue;
}
.white {
background-color:white;
}
.LTR-textarea {
position:relative;
resize:none;
height:10080px;
width:100%;
background-color:green;
color:white;
margin-top:60px;
margin-left:0px;
box-sizing:border-box;
border:none;
outline:none;
}
.LTR-textarea::placeholder {
content:"KernskyLTR...";
color:white;
}
.RTL-textarea {
position:relative;
resize:none;
height:10080px;
width:100%;
background-color:white;
color:green;
margin-top:60px;
margin-left:0px;
box-sizing:border-box;
border:none;
outline:none;
transform:rotateY(180deg);
}
.RTL-textarea::placeholder {
content:"KernskyRTL...";
color:green;
}
.button-left-bottom {
height: 30px;
width: 15px;
margin: 0px;
border-radius: 15px 0px 0px 15px;
border: none;
position: absolute;
float:right;
top:100%;
right:50%;
}
.button-right-bottom {
height: 30px;
width: 15px;
margin: 0px;
border-radius: 0px 15px 15px 0px;
border: none;
position: absolute;
top:100%;
left:50%;
}
</style>
<body style="background-color:gray">
<div class="flex-parent">
<div class="flex-child" id="button-nav">
<textarea class="LTR-textarea" placeholder="KernskyLTR..."></textarea>
<button class="button-left-bottom" type="button" data-btn="0" style="top:18px"></button>
</div>
<div class="flex-child" id="button-nav">
<textarea class="RTL-textarea" placeholder="KernskyRTL..."></textarea>
<button class="button-right-bottom" type="button" data-btn="1" style="top:18px"></button>
</div>
</div>
<script src="
https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="Code.gs"></script>
<script>
var colors = ["black", "red", "green", "blue", "white"];
var buttonIndex = [0,0];
$('#button-nav').on('click','button', function (evt) {
var res = $(this).data('btn');
$(this).removeClass(colors[buttonIndex[res]]);
buttonIndex[res] = (buttonIndex[res] +1) % 5;
if(res == 0) {
if (buttonIndex[1] == buttonIndex[res]) {
buttonIndex[res] = (buttonIndex[res] +1) % 5;
}
}
if(res == 1) {
if (buttonIndex[0] == buttonIndex[res] ) {
buttonIndex[res] = (buttonIndex[res] +1) % 5;
}
}
$(this).addClass(colors[buttonIndex[res]]);
});
</script>
</body>