Skip to content

Instantly share code, notes, and snippets.

// Common JavaScript code across your application goes here.
jQuery.ajaxSetup({
'beforeSend': function(xhr) { xhr.setRequestHeader("Accept", "text/javascript") }
})
$(document).ready(fuction() {
$("div.votes a").click(function(){
$.post(this.href, {"vote[value]": (this.className == "vote_up") ? 1 : -1});
})
})