I am wanting to implement AJAX into the admin pages of my Wordpress theme. I seem to almost be there, but I am somehow fading-in the wrong class.
Please see this screenshot with the class labels provided:
Here is what's happening:
I click on Appearance > Site Options and the page display correctly with a single page of options
I click on one of the top navigation tabs, and the page fades out correctly.
When the page fades back in - it appears like the 2nd screenshot below.
Here is the code that is currently handling the request:
jQuery('.nav-tab').live('click', function(e){
e.preventDefault();
var link = jQuery(this).attr('href'); //Get the href attribute
jQuery('.page-form').fadeOut(500, function(){ //fade out the content area
jQuery("#loader").show(); // show the loader animation
}).load(link + '.page-form', function(){ jQuery('.page-form').fadeIn(500, function(){
jQuery("#loader").hide(); //hide the loader
});
});
});
So I just need to know how to show only the "page form" class inside of the rendered content, not the entire wordpress admin area.