Draggable() function
HTML
<!-- make an items draggable with .draggable() function -->
<div id="box">
<div id="box2" height="300px">
<div id="car">222</div>
</div>
</div>
CSS
#car{
width:200px;
height: 200px;
background: orange;
}
#box{
overflow:hidden;
background: transparant;
}
#box2{
overflow:hidden;
width:201px;
height:250px;
border:1px dotted black;
}
JavaScript
$( "#car" ).draggable({
axis: "y",
containment: "#box",
cursor: "move",
});