calling web service in jquery

calling web service in jquery

I am trying to call the web service web method using jquery ajax. But i dont what is the error in the following jquery script. can any one find the error and give the correct solution. Thanks in advance
  1. $.ajax({
  2. type: "POST",
  3. contentType: "application/json",
  4. url: "WebEmployee.asmx/employeeDetails",
  5. success: function (data) {
  6. //sucess function
  7. },
  8. error: function () {
  9. //error
  10. }