Skip to content

Instantly share code, notes, and snippets.

@AnkurVyas-BTC
Last active February 17, 2018 08:55
Show Gist options
  • Save AnkurVyas-BTC/1b6ce546a6b64dddcb01a276748c5b6b to your computer and use it in GitHub Desktop.
Save AnkurVyas-BTC/1b6ce546a6b64dddcb01a276748c5b6b to your computer and use it in GitHub Desktop.
<% if @diff_percentage != 0.0 %>
$('.result')
.removeClass('text-success')
.addClass('text-danger')
.html("Percentage Difference: <%= '%.2f' % @diff_percentage %>");
<% else %>
$('.result')
.removeClass('text-danger')
.addClass('text-success')
.html("Both contents are same!");
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment