Hyperlink Problem

Hyperlink Problem

Hi,

I am new with jQuery. Currently I am trying to integrate jQuery with PHP and MySQL (using XAMPP) and the code is:
  1. <?php
  2. include "latihan36_1.php";

  3. $q = "select * from mhs";
  4. $ex = mysql_query($q);
  5. echo "<a href='#' id='tambah-mhs'>Tambah MHS</a>";
  6. echo "<table border=1>";
  7. echo "<tr>
  8. <th>NPM</th><th>Nama</th><th>Alamat</th>
  9. <th>No Telp</th><th>Action</th></tr>";
  10. while($r = mysql_fetch_array($ex)){
  11. echo "<tr><td>".$r['npm']."</td>";
  12. echo "<td>".$r['nama']."</td>";
  13. echo "<td>".$r['alamat']."</td>";
  14. echo "<td>".$r['no_telp']."</td>";
  15. echo "<td><a href='#' id='ubah-mhs' x=' ".$r['npm']."'>Ubah</a>   ";
  16. echo "<a href='#' id='hapus-mhs' x=' ".$r['npm']."'>Hapus</a>";
  17. echo "</td></tr>";
  18. }
  19. echo "</table>";
  20. ?>

  21. <script type="text/javascript" src="jquery-1.12.3.js">
  22. $(document).ready(function(){
  23. $("#tambah-mhs").click(function(){
  24. $.get("latihan45.php",function(respon){
  25. $("#div-hasil").html(respon);
  26. });
  27. });
  28. $("#ubah-mhs").click(function(){
  29. var x = $(this).attr("x");
  30. $.get("latihan46.php", {n: x} function(respon){
  31. $("#div-hasil").html(respon);
  32. });
  33. });
  34. $("#hapus-mhs").click(function(){
  35. var x = $(this).attr("x");
  36. if(confirm("Anda yakin ingin menghapus data ini ?")) {
  37. $.get("latihan47.php", {n: x} function(respon){
  38. location.href = "latihan44.php";
  39. });
  40. };
  41. });
  42. });
  43. </script>
  44. <div id="div-hasil"></div>
My problem now is the page successfully connect to DB but when I click "Tambah MHS" (see no. 7) the page don't redirect to another page. it should be redirect to "latihan45.php" page (as stated in no. 27). Is there something wrong with my code?