I am doing some self-learning about JQuery.
Here is the code for my very simple HTML form:
<html>
<head>
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
</head>
<body>
<script type="text/javascript">
$(document).ready(function(){
$("#replybox").draggable();
});
</script>
<div id="replybox">
<form>
<table border="2">
<tr>
<td align="center">
<textarea name="data[Test][quote]" id="data[Test][quote]" rows="18"></textarea>
</td>
</tr>
</table>
</form>
</div>
</body>
</html>
The DIV table just could not be draggable,
I am not sure what’s wrong in the code.
Any ideas?
it looks like you’re trying to use the jQueryUI framework. .draggable() is not natively jQuery — the jQueryUI (plugin) adds that functionality in. jQueryUI Home
Alternatively, you can also link directly to the jQueryUI instance in GoogleAPIs.
But personally, I prefer to build my own download package from their home page, especially if all you need is .draggable().