jQuery not returning true or false
<p>so I do this:</p>

<pre><code>function loginFunc(userNameOrEmail, passWord){
        var emailOrUserNameV = encodeURIComponent(userNameOrEmail);
        var passWordV = encodeURIComponent(passWord);
        $.getJSON("http://mysite.com/pullData/login.php?callback=?",
              {
                emailOrUserName: emailOrUserNameV,
                passWord: passWordV
              },
              function(recievedData) {
                if(recievedData[0] == 'true'){
                    return true;
                }
                else{
                    return false;
                }

        });

}
</code></pre>

<p>then I do this:</p>

<pre><code>$('#loginBtnHtml').click(function(){
            var emailVar = $('#email_html').val();
            var pwdVar = $('#password_html').val();
            if(loginFunc(emailVar, pwdVar)){
                alert('good');
            }
            else{
                alert('bad');
            }

        });
</code></pre>

<p>If I run the <code>loginFunc()</code> with an <code>alert(recievedData[0]);</code> It works fine how do I get it to return bool to the <code>$('#loginBtnHtml').click();</code> ? </p>

<p>When I do this to troubleshoot:</p>

<pre><code>$('#loginBtnHtml').click(function(){
            var emailVar = $('#email_html').val();
            var pwdVar = $('#password_html').val();
            var whatIsBeingReturned = loginFunc(emailVar, pwdVar);
            alert(whatIsBeingReturned);

        });
</code></pre>

<p>it alerts with 'Undefined'... not sure what I'm doing wrong.</p>
