I am trying to show preloader gif image over some contents, I am trying with the below codes,
jQuery("#my_post_optionsd").html("<img src='ajax-spinner-preloader.gif'>").delay(1000).fadeOut(300);
but can’t get properly how can I show gif image over certain contents and hide after some interval
2
Answers
You can use a div in absolute position and also use setTimeout to hide the loader after specified time.
Wy don’t you use the
before
andcomplete
function in your ajax call?Use the styling like @The_Death_Raw posted