Answer the question
In order to leave comments, you need to log in
How to make return in $.ajax on jquery?
Good afternoon,
Such a problem, Return from the success block in $.ajax does
not work
$('.link').click(function(e)
{
e.preventDefault;
var bool;
$.ajax({
...
success : function(data)
{
if(data == 'true')
bool = true;
else
{
bool = false;
return false;
}
}
...
})
alert(bool);
})
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question