Ajaxed Div Hide And Show Hides Only After Div Load
I have this issue. I'm working on a jquery ajaxed site. I have the main content div in the middle and on top the navigation. I need to AJAX the content, because I have flash backgo
Solution 1:
Show the element in the load callback handler. i.e:
$("#page1").click(function(){
$("#content").hide();
$("#content").html(ajax_load).load(loadPage1, function(){
$("#content").show(2000)
});
});
Solution 2:
.load() takes 2 arguments, the URI and a callback to fire after load. API is found here: http://api.jquery.com/load/
function() {
$("#content").hide(2000);
$("#content").html(ajax_load).load(loadPage1, function() {
$("#content").show(2000);
});
}
Post a Comment for "Ajaxed Div Hide And Show Hides Only After Div Load"