Hello. I have this code in JQuery:
$('#prods').fadeOut(300, function(event){
chamaM(id_m);
});
$('#prods').fadeIn(300);
ChamaM()
is an AJAX function that makes a call to PHP code, displaying the contents within div #prods
.
Everything is working, but what is happening is that when the fadeout is complete the previous content is still there, so the fadeout()
and fadein()
happens in the current content and only then it loads the new content. In the test environment (XAMPP) everything works perfectly, but on the site server this error occurs.
The address, for you to view is: www.lumiledbrasil.com.br/produtos.php
I have tried some variations of functions and order of them, but without success. Can someone help me? I thought this code was only needed. If you need more information, just let me know. Thank you so much!