Right now in my AJAX call I send a json array and, I'm getting a json encoded array back from the server. This is functioning correctly, as I can verify the values in dev tools. What I want to add is a conditional block to check the value of response.remaining. If the value is a negative number, then display it one way, if its positive, display it another way, and if else, just display $0.00. Something like this:
request.done(function(response){
if(response.remaining.value() < 0){
$('#remaining').html('<h1 class="negativeNum">$' + response.remaining + '</h1>');
} else if(response.remaining.value() > 0) {
$('#remaining').html('<h1 class="positiveNum">$' + response.remaining + '</h1>');
} else {
$('#remaining').html('<h1>$0.00</h1>');
};
});