Laat 3 seconden load bar zien.


/ Published in: JavaScript
Save to your folder(s)

Laat 3 seconden de load div zien met daarin de loader gif animatie.
het element met id prijs wordt 3 seconden verborgen.


Copy this code and paste it in your HTML
  1. <script type="text/javascript">
  2. function show()
  3. {
  4. document.getElementById('load').style.display = 'inline';
  5. document.getElementById('prijs').style.display = 'none';
  6. setTimeout("hide()", 3000);
  7. }
  8.  
  9.  
  10.  
  11. function hide()
  12. {
  13. document.getElementById('load').style.display = 'none';
  14. document.getElementById('prijs').style.display = 'inline';
  15. }
  16.  
  17. setTimeout("hide()", 3000);
  18. </script>
  19.  
  20.  
  21.  
  22.  
  23.  
  24. <img src="afbeelding.png" alt="actie" title="actie" style="cursor: pointer;" onclick="show('load');">
  25.  
  26.  
  27. <div id="load"><img src="loader.gif" style="width: 110px;"></div>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.