jquery getJSON issue
jquery getJSON issue
- is_loggedin: function () {
- var status = false;
- $.getJSON('/api/isloggedin/',function(res){
- if(res.user_status){status = true;}
- });
- return status;
- }
in this case status returns always false. even user_status is true. what is wrong here? or should i re check my server-side.
thank you