delay an element loading on the page - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:delay

Description

delay an element loading on the page

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <title>SO question</title> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.js"></script> 
  <script type="text/javascript">
    $(window).load(function(){//  ww  w. ja v a2s .  c  o m
$(document).ready(function(){
   localStorage.setItem('visited', true);
    if(localStorage.getItem('visited')){
        $('body').css('background','red');
    }
});
    });

      </script> 
 </head> 
 <body>  
 </body>
</html>

Related Tutorials