<!DOCTYPE html> <html> <head> <link href = "https://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css" rel = "stylesheet"> <script src = "https://code.jquery.com/jquery-1.10.2.js"></script> <script src = "https://code.jquery.com/ui/1.10.4/jquery-ui.js"></script> </head> <body> <div id = "div1" style = "border:solid 1px;background-color:gainsboro;"> <span>You can't move me!</span><br /><br /> </div> <div id = "div2" style = "border:solid 1px;background-color:grey;"> <span> Dragging will start only after you drag me for 50px </span> <br /><br /> </div> <div id = "div3" style = "border:solid 1px;background-color:gainsboro;"> <span> You have to wait for 500ms for dragging to start! </span> <br /><br /> </div> <script> $("#div1 span").draggable ( { disabled: true } ); $("#div2 span").draggable ( { distance: 50 } ); $("#div3 span").draggable ( { delay: 500 } ); </script> </body> </html>
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy. Accept Learn more