I have the following code:
$("#scroll").draggable({ axis: "x", scroll: true, containment: "#area" });
.area{
position: absolute;
width: 1010px;
height: 100px;
margin-top:10px;
margin-left:10px;
overflow-x: auto;
overflow-y: hidden;
border: 1px rgb(89,89,89) solid;
}
.scroll{
position: absolute;
margin-top:10px;
margin-left:10px;
width: 35px;
height: 110px;
border: 4px rgb(161, 233, 240) solid;
background-position: bottom center;
background-size: 35px 30px;
background-repeat: no-repeat;
border-radius: 20px;
-moz-box-shadow: 0px 0px 0px 1px rgb(0, 0, 0),inset 0px 0px 0px 1px rgb(0, 0, 0);
-webkit-box-shadow: 0px 0px 0px 1px rgb(0, 0, 0),inset 0px 0px 0px 1px rgb(0, 0, 0);
box-shadow: 0px 0px 0px 1px rgb(0, 0, 0),inset 0px 0px 0px 1px rgb(0, 0, 0);
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><scriptsrc="https://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<div id="area" class="area">testeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee</div>
<div id="scroll" class="scroll draggable"></div>
I would like to know if there is any way for my div scroll
to take the place of the default browser%% ...
And, every time I select scroll
for the first time, it gives a "jump" of about 10 pixels to the side and does not return to the original position .... I wanted to fix this problem ....