1. Copy and paste the code below between the <head> and </head> tags of your web-page:
<script type="text/javascript">
function wobbler(){for(var e=0;e<wobtxt.length;e++)document.getElementById("wobb"+e).style.top=Math.round(height*Math.sin(e+wobcnt))+"px";wobcnt++}var speed=100;var height=3;var alink="http://ashprincesskawaii.blogspot.com/";var wobtxt,wobble,wobcnt=0;window.onload=function(){if(document.getElementById){var e,t;wobble=document.getElementById("wobble");wobtxt=wobble.firstChild.nodeValue;while(wobble.childNodes.length)wobble.removeChild(wobble.childNodes[0]);for(e=0;e<wobtxt.length;e++){t=document.createElement("span");t.setAttribute("id","wobb"+e);t.style.position="relative";t.appendChild(document.createTextNode(wobtxt.charAt(e)));if(alink){t.style.cursor="pointer";t.onclick=function(){top.location.href=alink}}wobble.appendChild(t)}setInterval("wobbler()",speed)}}
</script>
2. Place a <div> element with 'id="wobble"' on your web-page containing the text you wish. For example:
<span id="wobble">ROCKING TEXT EFFECT</span>
Enjoy!
0 Comments:
Posting Komentar