I have four divs and i have applied javascript transition property to increase the width and height on button click but i need to increase the height and width in the the same screen
I want on button click these divs should remain in this screen.Now when i press the button(+) for tracking box it increases the width and height to the right which goes out of screen, ineed the width and height to increase in the left so that it remains in the same screen and overlaps other divs.
function changec() {
var xDiv = document.getElementById('div1');
if (xDiv.style.height == '')
xDiv.style.height = '480px'
else
xDiv.style.height = ''
if (xDiv.style.width == '')
xDiv.style.width = '850px'
else
xDiv.style.width = ''
}
function changec2() {
var xDiv = document.getElementById('div2');
if (xDiv.style.height == '')
xDiv.style.height = '480px'
else
xDiv.style.height = ''
if (xDiv.style.width == '')
xDiv.style.width = '850px'
else
xDiv.style.width = ''
}
function changec3() {
var xDiv = document.getElementById('div3');
if (xDiv.style.height == '')
xDiv.style.height = '480px'
else
xDiv.style.height = ''
if (xDiv.style.width == '')
xDiv.style.width = '850px'
else
xDiv.style.width = ''
}
function changec4() {
var xDiv = document.getElementById('div4');
if (xDiv.style.height == '')
xDiv.style.height = '480px'
else
xDiv.style.height = ''
if (xDiv.style.width == '')
xDiv.style.width = '850px'
else
xDiv.style.width = ''
}
.gh{width:96%;height:auto;padding:10px;border:1px solid #aaaaaa;clear: both;margin:10px 10px 10px 10px;overflow:none;
position: relative;
display: block;
}
.leftbox{clear: both;
border:2px solid green;
float: left;
width: 100%;
height: 280px;
margin: 5px;
overflow: none;
overflow:scroll;
transition: all 0.2s ease;
z-index: 1000;
background:white;
position: absolute;
}
.leftbox2{
border:2px solid green;
float: left;
width: 100%;
height: 280px;
margin: 5px;
overflow: none;
overflow:scroll;
transition: all 1s ease;
z-index: 1;
background:white;
position: absolute;
}
.rightbox{clear: both;
border:3px solid red;
float: left;
width: 100%;
height: 280px;
margin: 5px;
overflow:scroll;
transition: all 2s ease;
}
.rightbox2{clear: both;
border:3px solid red;
float: left;
width: 100%;
height: 280px;
margin: 5px;
overflow:scroll;
transition: all 2s ease;
}
ul{
list-style-type: none;
}
.go{
min-height:300px;
height: 800px;
width: 100%;
overflow:scroll;
}
.btn{
width: 100%;
}
<div class="col-md-8 red">
<div class="col-md-6">
<h4 style="text-align:center">Done</h4>
<section class="leftbox" id="div1" ondrop="drop(event)" ondragover="allowDrop(event)" >
<button id="menu" onclick="changec()" class="pull-right fixed-top">+</button>
</section>
</div>
<div class="col-md-6">
<h4 style="text-align:center">Tracking</h4>
<section class="rightbox" id="div2" ondrop="drop(event)" ondragover="allowDrop(event)">
<button id="menu" onclick="changec2()" class="pull-right fixed-top">+</button>
</section>
</div>
<div class="col-md-6">
<h4 style="text-align:center">Pursuing</h4>
<section class="leftbox2" id="div3" ondrop="drop(event)" ondragover="allowDrop(event)">
<button id="menu" onclick="changec3()" class="pull-right fixed-top">+</button>
</section>
</div>
<div class="col-md-6">
<h4 style="text-align:center">Dropped</h4>
<section class="rightbox2" id="div4" ondrop="drop(event)" ondragover="allowDrop(event)">
<button id="menu" onclick="changec4()" class="pull-left fixed-top">+</button>
</section>
</div>
</div>