Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sammich/935726f822acbd45ca4d to your computer and use it in GitHub Desktop.
Save sammich/935726f822acbd45ca4d to your computer and use it in GitHub Desktop.
$('.vote-positive').each(function (i, el) {
var pos = +el.textContent;
var neg = +$(el).siblings('.vote-negative').text()
var tot = pos + Math.abs(neg);
if (tot < 40) {
console.log(tot)
$(el).closest('li').css('opacity', 0.5)
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment