php - Adding intro image fadeIn wordpress -


i add image fades in , fades out after amount of time. have tried add code below index.php , works throws off alignments , spacings. put loads when homepage first loaded?

<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script> <script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script> <img style="display: none; z-index: 9999;" id="book" src="images/test.jpg" alt="" width="100%" height="100%">  <script>         $( "#book" ).fadein ( 2500, function() {});     $( "#book" ).fadeout( 1000, function() {}); </script> 

use document on ready, fire function when document loaded:

<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script> <script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script> <img style="display: none; z-index: 9999;" id="book" src="images/test.jpg" alt="" width="100%" height="100%">  <script>        $(document).ready(function(){     $( "#book" ).fadein ( 2500, function() {});     $( "#book" ).fadeout( 1000, function() {});   }); </script> 

let me know if works


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -