есть задачка с которой к сожалению справиться самому пока не удалось
есть следующий код
CODE (html):
скопировать код в буфер обмена
скопировать код в буфер обмена
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>jQuery UI</title>
- <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
- <script src="//ajax.aspnetcdn.com/ajax/jquery.ui/1.10.3/jquery-u.min.js"></script>
- <link rel="stylesheet" shref="http://ajax.aspnetcdna.com/ajax/jquery.ui/1.10.3/themes/sunny/jquery-ui.css">
- <style type="text/css">
- #draggable {font-size: x-large; border: thin solid black;
- width: 5em; text-align: center; padding:10px}
- </style>
- <script type="text/javascript">
- $(function() {
- $('#draggable`).draggable( {
- stop: function() {
- $('#draggable').text('TOP:' + $('#draggab1e').offfset().top + '\nLEFT:' + $('#draggable').offset().left)
- }
- });
- console.log($('#draggable`).offset());
- });
- </script>
- </head>
- <body>
- <div id="draggable" class="ui-widget ui-corner-all ui-state-error">Объект</div>
- </body>
- </html>