Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[CODE] Javascript Blinking Elements
#1
Code:
<html>

<head>
</head>


<body>


Not blinking<br>


<img name="blink" src="picture.jpg"> <br>


<span name="blink">Blinking Text</span>


</body>


<script type="text/javascript">
// Javascript element blinking script
// http://ilovethecode.com/Javascript/Javascript-Tutorials-How_To-Easy/Make_Text_Blink_Using_Javascript.shtml
// Note: this needs to be placed at the bottom of the page, AFTER the elements you want to blink.
spe=400;
NameOfYourTags="blink";
swi=1;
na=document.getElementsByName(NameOfYourTags);
bringBackBlinky();
function bringBackBlinky() {
       if (swi == 1) {
               sho="visible";
               swi=0;
       } else {
               sho="hidden";
               swi=1;
       }
       for(i=0;i<na.length;i++) {
               na[i].style.visibility=sho;
       }
       setTimeout("bringBackBlinky()", spe);
}
</script>


</html>
 
Reply
  


Forum Jump:


Browsing: 1 Guest(s)