I have this jquery code:
var response = $("div.callbacktwo").html(result);
if (response == 'Added!'){
//some code here
}
Unfortunately, this does not work. I want to check if “Added!” is in the callback. Any ideas?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In your code example, the variable
responseis the jQuery object$("div.callbacktwo")soresponse!= ‘Added!’`.Also, you ask about “in the callback”, but there are no callbacks in the code you included. Perhaps you mean to check: