Hi everyone,
i have a small problem
i paste my code here
My problem is this: i dont want my window div ( <div id="window"> Drag me </div>) cannot be drag out of warp div.
html code
<div id="warp">
<div id="window">
Drag me
</div>
</div>
css code
body{
margin:0;
background-color:#e67e22;
}
#window{
width:150px;
height:200px;
//background-color:#1abc9c;
border:2px solid #16a085;
padding:20px;
}
#warp{
margin:10px;
width:700px;
height:600px;
border:2px solid #e74c3c;
}
js code
$(document).ready(function(){
$( "#window" ).draggable();
});
i mean when i drag it with mouse then it doesnt go out of warp div