I have a function I call on form submit and once result is received by ajax. The function is to show or hide loader gif on a page.
It works well in Firefox and IE, while in Chrome the laoder doesn't show/ form doesn't hide. However if I do js debugging in the console in Chrome the loader and form show/ hide works well.
Quite strange it doesn't work without debugging. I have no errors in the console at any time.
The function:
function loader2(loaderClass, destinationClass, showLoader) {
var $loading = $(loaderClass).hide();
var $form = $(destinationClass).show();
if (showLoader) {
$loading.slideDown(500);
$form.hide();
} else {
$loading.hide();
$form.slideDown(500);
}
}