I am trying the following code to have each td or each row be movable, such as drag and drop. It seems like its not accepting the jQuery any suggestions?
I have tried doing all the code in one page and it is still not working
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>
Jomana Sherif Presentation
</title>
<link rel="stylesheet" type="text/css" href="first.css">
<!--
<script type="text/javascript" src="jquery-1.3.1.min.js"></script>
-->
<script type="text/javascript" src="jquery.tablesorter.min.js"></script>
<script src="first.js"></script>
<link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css"> </link>
<script src="//code.jquery.com/jquery-1.9.1.js"></script>
<script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<style>
#sortedtable { list-style-type: none; margin: 0; padding: 0; width: 60%; }
#sortedtable td { margin: 0 3px 3px 3px; padding: 0.4em; padding-left: 1.5em; font-size: 1.4em; height: 18px; }
#sortedtable ld{ position: absolute; margin-left: -1.3em; }
</style>
<script>
$(function() {
$( "#sortedtable" ).sortable();
$( "#sortedtable" ).disableSelection();
});
</script>
</head>
<body bgcolor="#E6E6FA">
<?php
if(!$link = mysql_connect("localhost", "root", "")) {
echo "Cannot connect to db server";
}
elseif(!mysql_select_db("Disney")) {
echo "Cannot select database";
}
else {
if(!$rs = mysql_query("SELECT * FROM DisneyCharacters")) {
echo "Cannot parse query";
}
elseif(mysql_num_rows($rs) == 0) {
echo "No records found";
}
else {
echo "<table id=\"sortedtable\" class=\"bordered\" cellspacing=\"0\">\n";
echo "<thead>\n<tr>";
echo "<th>Name </th>";
echo "<th>Movie </th>";
echo "<th>Year </th>";
echo "</tr>\n</thead>\n";
while($row = mysql_fetch_array($rs)) {
echo "<tr>";
echo "<td>" . $row['Name'] . "</td>";
echo "<td>" . $row['Movie'] . "</td>";
echo "<td>" . $row['Year'] . "</td>";
echo "</tr>";
}
echo "</table><br />\n";
}
}
?>
</body>
</html>