2 $("#analyze").click(function(){
\r
3 var user_1 = $.trim($("#user_1").val());
\r
4 var user_2 = $.trim($("#user_2").val());
\r
5 if(user_1 === $.trim($("#sideid").text())){
\r
6 $("#descr").animate({opacity: 0}, 200, function(){
\r
7 $("#descr").html("Due to the the limitation of API, you cannot enter your name in the first blank!").css("color", "#83161F").animate({opacity: 1}, 100);
\r
11 if(user_1 !== '' & user_2 !== ''){
\r
12 $("#analyze").val("").addClass("loading");
\r
14 url: "ajax/getRelationship.php" + "?target=" + user_1 + "&source=" + user_2,
\r
17 data: "target=" + user_1 + "&source=" + user_2,
\r
18 success: function(msg) {
\r
20 if(msg.length > 0 && msg !== "error") {
\r
21 $("#analyze").val("Analyze").removeClass("loading");
\r
22 $("#descr").html("Rabr Nexus is a tool helps you analyze relationships between you or the others.").css("color", "#333333");
\r
23 $("#result").animate({opacity: 0}, 500, function(){
\r
24 $("#result").removeClass("intro").html(msg).animate({opacity: 1}, 500);
\r
27 $("#descr").animate({opacity: 0}, 200, function(){
\r
28 $("#descr").html("Something went wrong, please try again!").css("color", "#83161F").animate({opacity: 1}, 100);
\r
33 $("#descr").animate({opacity: 0}, 200, function(){
\r
34 $("#descr").html("Something went wrong, please try again!").css("color", "#83161F").animate({opacity: 1}, 100);
\r