Skip to content
Snippets Groups Projects
Commit 56ca1d60 authored by Eric Rasmussen's avatar Eric Rasmussen
Browse files

Use WDN.post rather than $.ajax

parent 9998df3b
No related branches found
No related tags found
No related merge requests found
......@@ -35,19 +35,18 @@ WDN.jQuery(function($) {
$(".vote").click(function() {
var parent = $(this);
$(this).fadeIn(200).html('...');
$.ajax({
type: "POST",
url: "castvote.php",
data: 'id=' + $(this).attr("id"),
cache: false,
success: function(html){
WDN.post(
"castvote.php",
'id=' + $(this).attr("id"),
function(html){
parent.html(html);
parent.removeClass('vote red');
parent.addClass('green');
parent.unbind('click');
$(".vote").slideToggle("fast");
}
});
},
''
);
return false;
});
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment