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

 using Microsoft.AspNetCore.Mvc; using System.Xml.Linq; using System.Xml.XPath; //<table class="common-table medium js-table js-stre...