Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- // <![CDATA[
- var speed=100; // speed of wobbling, lower is faster
- var height=3; // height of wobbling in pixels
- var alink="http://www.mf2fm.com/rv"; // page to link text to (set to ="" for no link)
- /****************************
- * Wobbly Text Effect *
- *(c) 2003-6 mf2fm web-design*
- * http://www.mf2fm.com/rv *
- * DON'T EDIT BELOW THIS BOX *
- ****************************/
- var wobtxt, wobble, wobcnt=0;
- window.onload=function() { if (document.getElementById) {
- var i, wobli;
- wobble=document.getElementById("wobble");
- wobtxt=wobble.firstChild.nodeValue;
- while (wobble.childNodes.length) wobble.removeChild(wobble.childNodes[0]);
- for (i=0; i<wobtxt.length; i++) {
- wobli=document.createElement("span");
- wobli.setAttribute("id", "wobb"+i);
- wobli.style.position="relative";
- wobli.appendChild(document.createTextNode(wobtxt.charAt(i)));
- if (alink) {
- wobli.style.cursor="pointer";
- wobli.onclick=function() { top.location.href=alink; }
- }
- wobble.appendChild(wobli);
- }
- setInterval("wobbler()", speed);
- }}
- function wobbler() {
- for (var i=0; i<wobtxt.length; i++) document.getElementById("wobb"+i).style.top=Math.round(height*Math.sin(i+wobcnt))+"px"
- wobcnt++;
- }
- // ]]>
- </script>
- <style>
- /*you can change this as much as youd like. howdy from ian @ codes.crd*/
- marquee {
- }
- #wobble {
- }
- </style>
- <marquee>check out this <span id="wobble">WOBBLY TEXT</span></marquee>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement