I have problems to set elements draggable using jQueryUI 1.12.1. There is no problem, when draggable element is <div>
, but when I switched it to the <input ... >
, it does not move from place. I tried to disable element too in order to make it more "stiff", but it makes no difference.
The similarly pitiful outcomes I had with resizing <label>
for <input>
. I could move it on the screen, but I was unable to resize it.
Here is code I just copied from the page and made minor changes:
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>resizable demo</title> <link rel="stylesheet" href="http://code.jquery.com/ui/1.12.1/themes/smoothness/jquery-ui.css"> <style> #brick { width: 100px; height: 100px; background: #ccc; } </style> <script src="http://code.jquery.com/jquery-1.12.4.js"></script> <script src="http://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> </head> <body> <label id="brickLabel" for="brick">Brick is stiff</label> <input type='text' id="brick" disabled/> <div id="goodBrick" style="width: 100px; height: 70px; background-color: #EF45fE"></div> <script> $( "#goodBrick" ).draggable(); $( "#goodBrick" ).resizable(); $( "#brick" ).draggable(); $( "#brick" ).resizable(); $( "#brickLabel" ).draggable(); $( "#brickLabel" ).resizable(); </script> </body> </html>