title: How to solve error in my JavaScript code?
body: <p>I have syntax error in my script.js file on line 38, here is my javascript code.
  i used PHP ajax and javascript to repeat table rows.also i used html table tag to display news and i am going to make a newsletter thorugh php including mysql database. </p>
  
  <pre><code>$(document).ready(function(){
  $("#save").click(function(){
      ajax("save");
  });
  
  $("#add_new").click(function(){
      $(".entry-form").fadeIn("fast");    
  });
  
  $("#close").click(function(){
      $(".entry-form").fadeOut("fast");   
  });
  
  $("#cancel").click(function(){
      $(".entry-form").fadeOut("fast");   
  });
  
  $(".del").live("click",function(){
      ajax("delete",$(this).attr("id"));
  });
  
  function ajax(action,id){
      if(action =="save")
          data = $("#userinfo").serialize()+"&amp;amp;action="+action;
      else if(action == "delete"){
          data = "action="+action+"&amp;amp;item_id="+id;
      }
  
      $.ajax({
          type: "POST", 
          url: "ajax.php", 
          data : data,
          dataType: "json",
          success: function(response){
              if(response.success == "1"){
                  if(action == "save"){
                      $(".entry-form").fadeOut("fast",function(){
                          $(".table-list").append(""+response.fname+""+response.lname+""+response.email+""+response.phone+"&lt;a id="+response.row_id+" class="del" href="#"&gt;Delete&lt;/a&gt;");   
                          $(".table-list tr:last").effect("highlight", {
                              color: '#4BADF5'
                          }, 1000);
                      }); 
                  }else if(action == "delete"){
                      var row_id = response.item_id;
                      $("a[id='"+row_id+"']").closest("tr").effect("highlight", {
                          color: '#4BADF5'
                      }, 1000);
                      $("a[id='"+row_id+"']").closest("tr").fadeOut();
                  }
              }
          },
          error: function(res){
              alert("Unexpected error! Try again.");
          }
      });
  }
  </code></pre>
  
  <p>});</p>