I have two div
's when dragging from div1
to div2
, the div1
scrollbar will appear and keep extending all the way until I drag the element on div2
. How can I prevent the div
from extending when I drag the element inside? Whole the element I am dragging does not break?
<div class="container-fluid">
<div class="row">
<div class="col-md-2 hidden-sm hidden-xs">
<div id='external-events'>
<h4>Draggable Events</h4>
<div class="tooltipevent" style="width:100px;height:100px;background:#ccc;position:absolute;z-index:10001;">some event</div>
<div class="tooltipevent" style="width:100px;height:100px;background:#ccc;position:absolute;z-index:10001;">some event</div>
<div class="tooltipevent" style="width:100px;height:100px;background:#ccc;position:absolute;z-index:10001;">some event</div>
<div class="tooltipevent" style="width:100px;height:100px;background:#ccc;position:absolute;z-index:10001;">some event</div>
<div class="tooltipevent" style="width:100px;height:100px;background:#ccc;position:absolute;z-index:10001;">some event</div>
</div>
</div>
<div class="col-md-5 col-sm-12 col-xs-12">
<hr>
<div id="calendar"></div>
//drop event here
</div>
</div>
Drag panel CSS and size
#external-events {
float: left;
max-width: 260px;
width: 260px;
padding: 0 10px;
border: 1px solid #ccc;
background: #eee;
text-align: left;
overflow-y: auto;
overflow-x: hidden;
max-height: 400px;
margin-left: -10px;
}
after dragging