Hello everyone

First, I have to say that I am not very familiar with javascript (I know only basics of basics) and I know basics of Jquery...
Here is my problem: I found jquery ajax plugin that calls some php file after clicking link and does some (visual) actions with it. I've made some modifications but dont know how to make it work exactly what I want.
This is code:
$(document).ready(function() {
$('#load').hide();
$('.update2').hide();
});
$(function() {
$(".update").click(function() {
$('#load').fadeIn();
var updateContainer = $(this);
var id = $(this).attr("id");
var string = 'id='+ id ;
$.ajax({
type: "POST",
url: "include/ajax-edit/update.php",
data: string,
cache: false,
success: function(){
updateContainer.slideUp('slow', function() {$(this).remove();});
}
});
return false;
});
});
In database there are three states of this class: 0, 1 and 2
What I want is when clicking on link (.update class) that it (using php file - this is part I can handle myself) changes state (if current state is 0 then after clicking it's 1, if it's 1 then 2, if 2 then 0) and that each state has it's own css class and that appropriate class is displayed depending on state.
Actually, classes are being different only in background image, so it can be even one class but change only that one property and then show it.
UPDATE:
Position of shown and hidden link (div) must be the same during and after effect. I mean, when hidden one begins to show, it should start showing exactly where the disappearing one used to be.
Thanks in advance for any help!
Cheers,
Ile