Created
February 23, 2011 17:34
-
-
Save benjgorman/840774 to your computer and use it in GitHub Desktop.
The JSON returns fine however when this.Following has the value of "true"(string) and then comparing it to test 2, the else statement is called. Can you see any reason why?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() {followLoad();}); | |
function followLoad () | |
{ | |
$.getJSON("/Twitzer/Author/<%=Author.getuserName()%>/json", function(json) | |
{ | |
var test="true"; | |
var test2=this.Following; | |
if (test2==test) | |
{ | |
$("#followButton").append('<button id="unfollow">Unfollow</button>'); | |
} | |
else | |
{ | |
$("#followButton").append('<button id="follow">Follow</button>'); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Above is the solution to the problem.