Start javascript animation after an image has loaded -


i'm looking way initiate text animation after background image has loaded. specifically, h1 element should animate after div#image-bg has loaded it's background image. i'm using wow.js animate objects , developer's intention initiate movement on scroll. see full site issue exists, it's @ abbyaker.com.

here's stripped version of html page:

<html> <head>     <link rel="stylesheet" href="css/style.css">     <link rel="stylesheet" href="css/animate.css"> </head> <body>     <div id="container">     <!-- - - - - - - - - - - - - - intro - - - - - - - - - - - - - -->         <div id="headwrap">             <div id="image-bg"></div>             <div id="intro">                 <h1 class="white wow fadeinup" data-wow-duration="700ms" data-wow-delay="400ms">hello</h1>             </div>         </div>     </div>     <script src="js/wow.min.js"></script>     <script>      new wow().init();     </script> </body> 

your appreciated!

you need detect if background image set css has finished loading. can plugin called waitforimages.

you this.

$('div#image-bg').waitforimages({     waitforall: true,     finished: function() {         //do animation here.     } }); 

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -