We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9dea8b9 commit 3534e8cCopy full SHA for 3534e8c
public/js/script.js
@@ -16,7 +16,15 @@ $(document).ready(function(){
16
console.log(msg.responseText);
17
var score = msg.responseText;
18
score = (Math.round(parseFloat(score)*10))/10;
19
- $("div.result").append('<span><h1>'+score+'</h1></span>');
+ if(score > 8)
20
+ rating = "Extremely positive";
21
+ else if(score > 6)
22
+ rating = "Fairly positive";
23
+ else if(score > 4)
24
+ rating = "Mixed";
25
+ else
26
+ rating = "Negative";
27
+ $("div.result").append('<span><h1>'+rating+':'+score+'</h1></span>');
28
$("#ajax-loader").remove();
29
}
30
})
0 commit comments