Tuesday, March 26, 2013

jQuery : making a button draggable : use draggable({cancel:false})









<!DOCTYPE html>
<html>
<head>
 <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
  <script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>
 <script>
  $(function() {
$("#mydiv").draggable();
$("#mybutton").draggable({cancel:false});
  });
  </script>
</head>
<body>

<div id="mydiv" > sdfdsfds </div>
<input type="button" id="mybutton" value="Submit form" />
</body>
</html>

No comments:

Post a Comment

How to check local and global angular versions

 Use the command ng version (or ng v ) to find the version of Angular CLI in the current folder. Run it outside of the Angular project, to f...