I\'m trying to make Ajax content for WordPress posts to appear using jQuery animation effects, the problem is that the first animation - in this case \"fadeOut\" works OK but th
Here is an complete example:
- HTML
// Your static content
// Your AJAX loaded content
- JS
$(document).ready(function()
{
function ajax_request() {
$.ajax({
//ajax request
});
}
// for when the page first loads
ajax_request();
$('#your_trigger').change(function()
{
$('table tbody').hide('fast',load_content);
$('#load').remove();
$('table tbody').append('LOADING...');
$('#load').fadeIn('fast');
function load_content() {
ajax_request();
show_new_content();
}
function show_new_content() {
$('table tbody').show('fast',hideLoader());
}
function hide_loader() {
$('#load').fadeOut('fast');
}
});
});