Sha256: f02450d90642a6d91adbc45dabebe21ed537ca1090f10441b22f19a76858e359
Contents?: true
Size: 756 Bytes
Versions: 8
Compression:
Stored size: 756 Bytes
Contents
$(document).ready(function() { neutral = $("div.neutral").find("<%= by_url %>").parent(); neutral.find("a[class!='remove']").data('method', 'post'); neutral.find("a[class!='remove']").attr('data-method', 'post'); neutral.find("a.positive").attr('href', '<%= votes_path(1) %>'); neutral.find("a.negative").attr('href', '<%= votes_path(0) %>'); neutral.find("span.positive").html("<%= voting.positive.nonzero? %>"); neutral.find("span.negative").html("<%= voting.negative.nonzero? %>"); neutral.find("span.difference").html("<%= voting.difference.nonzero?.try(:abs) %>"); neutral.find("span.difference").attr("class", "<%= "difference #{voting.difference > 0 ? 'positive' : 'negative'}" %>"); neutral.find("a.remove").remove(); });
Version data entries
8 entries across 8 versions & 1 rubygems