You swat at a fly, step on an ant, squash a cockroach, you don't think much of it. In fact, killing a bug gives you a sense of accomplishment. Fucking ant was ruining your picnic, cockroach was crawling through your kitchen cabinets. You put an end to their disgusting, miserable little lives and make a better world for everyone. Only, for every one you kill, more appear. Bigger, uglier, meaner than before.
Verdict.js is a set of jQuery plugins for short and sweet user interaction. It's our take on how to deal with annoying interfaces to crappy websites. It's 100 lines of code.
Usage
<script src='verdict.js' type='text/javascript'></script>
Number Selection
Addiction should never be treated as a crime. It has to be treated as a health problem. We do not send alcoholics to jail in this country. Over 500,000 people are in our jails who are nonviolent drug users.
$("#ralph-nader").numbers({max: 1000000, min: 2, step: 80});
Boolean Flip
Theodore Robert "Ted" Bundy was an American serial killer, rapist, kidnapper, and necrophile who assaulted and murdered numerous young women during the 1970s, and possibly earlier.
$("#ted1").bool_select({first: 'serial killer', second: 'serial entrepreneur'}); $("#ted2").bool_select({first: 'rapist', second: 'rapper'}); $("#ted3").bool_select({first: 'kidnapper', second: 'babysitter'}); $("#ted4").bool_select({first: 'necrophile', second: 'overall, a very decent man'});
Formats
$.format.num
will help you to format numbers in a -1,111.111
fashion.
Reactive Documents
verdict_change
is fired on every change. Just bind to it.
nearly 2,000,000 americans are
incarcerated in the prison system
prison system of the US
(US Prison Budget: $68,747,203,000)
They're trying to build a prison
They're trying to build a prison
They're trying to build a prison
For you and me to live in!
Another prison system
Another prison system
Another prison system
For you and me!
$("#system-of-a-down").numbers({max: 10000000, min: 0, step: 10000}) .bind("verdict_change", function(e, prisoners) { // 68,747,203,000 / 2,000,000 $("#prison-budget").text( $.format.num(Math.floor(prisoners * 34373.6015))); });