Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Jquery draggable

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 164
    Comment on it

    Hello Readers ,

    While building a web application , several times we need a box or a div which can be draggable so below is the code for explaining that .

    Example :

    <!DOCTYPE html>  
    <head>  
      <link href="http://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css" rel="stylesheet">  
      <script src="http://code.jquery.com/jquery-1.10.2.js"></script>  
      <script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>  
      <style>  
      #draggable { width: 100px; height: 100px; padding: 0.5em; background:#7fffd4;}  
      </style>  
      <script>  
      $(function() {  
        $( "#draggable" ).draggable();  
      });  
      </script>  
    </head>  
    <body>  
         <div id="draggable" class="ui-widget-content">  
          <p>I am draggable!</p>  
         </div>  
    </body>  
    </html>  
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: