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