jQuery UI Dragging with containment
<!doctype html> <html> <head> <meta charset="utf-8" /> <title>jQuery UI Dragging with containment</title> <style type="text/css"> <!-- #drg { width:380px; height:210px; border:2px solid blue; } #prt { width:305px; height:100px; margin:8px; background:#F90; } #prt p { width:185px; margin:1px; background:#a7daa8; } --> </style> <script src=" http://code.jquery.com/jquery-1.8.2.js "></script> <script src=" http://code.jquery.com/ui/1.9.1/jquery-ui.js "></script> <script type="text/javascript"><!-- $(document).ready(function() { // sets draggable the elements with id="im" $('#im').draggable({ cursor: 'move', // sets the cursor apperance ...