I want to convert my $.post
call to $.ajax
call because I need to clean the cache for every call.
My $.post
call is as follows:
$.post("test",
function(data) {
$("#test").html(data);
initTest();
}
).success(function(){
$('.box1').hide("slide", {direction: "left"}, 1000);
$('.box3').show("slide", {direction: "right"}, 1000);
});
I tried this but it doesn't work...
$.ajax({
type: "POST",
url: "test",
success: function (data) {
$("#test").html(data);
$('.box1').hide("slide", {direction: "left"}, 1000);
$('.box3').show("slide", {direction: "right"}, 1000);
},
dataType: "json",
cache: false
});