jquery コードから次の応答を返したいと考えています。
function count_waiting(){
$.ajax({
url: 'index.php/event/count_waiting/2',
type: "post",
success: function(response) {
return response;
}
});
}
これを行うことにより、リターンは undefned です
$(document).ready(function() {
alert(count_waiting());
});
私のコードの何が問題なのか