javascript - Show the loader upto loading the background image for a div in jQuery -


i set background image div. but, want show loader loading background image <div/> in jquery.

you can load image jquery using load function.

for example:

$("<img src='pathtoimg/img.jpg'>").load(function(){     //any code in here run after image has loaded. }); 

Comments