followers.js
683 Bytes
$(".action-follow").live("click", function() {
var button = $(this);
var url = button.attr("href");
// TODO: add progress cursor and error handling
$.post(url, function(data) {
button.fadeOut('fast', function() {
$("#follow-categories-container").html(data);
$("#follow-categories-container").fadeIn();
});
});
return false;
});
$(".action-change-category").live("click", function() {
var category = $(this).text().trim();
var url = $(this).attr("href");
// TODO: add progress cursor and error handling
$.post(url, { 'category_name': category }, function(data) {
$("#follow-categories-container").fadeOut();
});
return false;
});