Posted By

icecreamboyy on 02/23/11


Tagged


Versions (?)

Blink Text


 / Published in: JavaScript
 

  1. <script>
  2. function blink(elId){
  3. var html = '';
  4. if(document.all){
  5. html += 'var bl = document.all.' + elId + ';';
  6. }
  7. else if(document.getElementById){
  8. html += 'var bl = document.getElementById("' + elId + '");';
  9. }
  10. html += 'bl.style.visibility = ' + 'bl.style.visibility == "hidden" ? "visible" : "hidden"';
  11. if(document.all || document.getElementById){
  12. setInterval(html, 100);
  13. }
  14. }
  15. function init(){
  16. blink('Text');
  17. }
  18. onload=init;
  19. </script>
  20.  
  21. <div id="Text">
  22. <blink>
  23. Hello blinky!
  24. </blink>
  25. </div>

Report this snippet  

You need to login to post a comment.