I am using AJAX functionality to load my WordPress pages in real time. I use the following approach to load it in real time
I am facing a problem that is loading ... text is visible from half to second and the old content is again shown .. and then 4-5 After seconds, this content can only be loaded with the new old one until the content is fully loaded. The question is not quite clear to me, But, and, to We pass function references (we do not call them) In addition, I do not think any This is either In addition, after this line Do not wait for the animation to complete. They are called instantly. I think, you want them to be var toLoad = $ (this) .attr ('href') + '#container';
$ ('# container') .slideUp ('300', Load Content); $ $ ('# Load'). Remove (); $$ ('# wrapper') Attachment ('& lt; span id = "load"> LOADING ... & lt; / span & gt;'); $ $ ('# Load'). Feedine ('normal');
window.location.hash = $ (this) .attr ('href') .substr (0, $ (this) .attr ('href'). Length-5);
Function Load Dialog () {$ $ ('# Container'). Load (toload, '', showNewContent ())
} showNewContent () {$ $ ('# container'). Slidedown ('400', HiddenOlder ());
} Hide the looker () {
$ ('# load'). Fadeaut ('normal');
}
False Return;
$ ('# container'). Load (toLoad, '', showNewContent ())
$ ('# container') should be changed LoadDown ('400', hideLoader), Load (Load, '', ShowNewContent)
$ ('# container' ).
$ ('# container'). Slide Down ('400', HiddenOlder);
FadeIn ('normal')
. FadeIn ('slow') or
. FadeIn ('fast')
$ ('# container'). SlideUp ('300', Load Content);
loadContent function
Comments
Post a Comment