Mark Forums Read
  #1  
Old 05-22-2010, 12:59 AM
JavaScriptBank JavaScriptBank is offline
Senior Member
 
Join Date: Sep 2009
Posts: 130
JavaScriptBank is on a distinguished road
Default Waving Text Trailer

This JavaScript codecan be used to be that a mouse cursor pointer was just a mouse cursor. Since DHTML came along and gave programmers the ability to track the precise coordinates of the mouse, it was... detail at JavaScriptBank.com - 2.000+ free JavaScript codes


How to setup

Step 1: Place CSS below in your HEAD section
CSS
Code:
<STYLE>.spanstyle { FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Verdana; POSITION: absolute; TOP: -50px } </STYLE>
Step 2: Copy & Paste JavaScript code below in your HEAD section
JavaScript
Code:
<SCRIPT> /* Cursor Trailor Text- By Peter Gehrig (http://www.24fun.ch/) Permission given to Dynamicdrive.com to feature script in it's archive. */ var moves=17 var tracker=0 var xpos var ypos var cursortext='JavaScriptBank.com - Bank of over 2000+ free JavaScript' cursortext=cursortext.split("") function setup() { if (tracker==1 && document.all) { for (i=cursortext.length-1; i>=1; i--) { xposition[i]=xposition[i-1]+moves yposition[i]=yposition[i-1] } xposition[0]=xpos+moves yposition[0]=ypos for (i=0; i<cursortext.length-1; i++) { var thisspan = eval("span"+(i)+".style") thisspan.posLeft=xposition[i] thisspan.posTop=yposition[i] } } else if (tracker==1 && document.layers) { for (i=cursortext.length-1; i>=1; i--) { xposition[i]=xposition[i-1]+moves yposition[i]=yposition[i-1] } xposition[0]=xpos+moves yposition[0]=ypos for (i=0; i<cursortext.length-1; i++) { var thisspan = eval("document.span"+i) thisspan.left=xposition[i] thisspan.top=yposition[i] } } var timer=setTimeout("setup()",40) } function MouseMovement(e) { xpos = (document.layers) ? e.pageX : document.body.scrollLeft+event.clientX ypos = (document.layers) ? e.pageY : document.body.scrollTop+event.clientY tracker=1 } var xposition=new Array() for (i=0;i<=cursortext.length-1;i++) { xposition[i]=-50 } var yposition=new Array() for (i=0;i<=cursortext.length-1;i++) { yposition[i]=-50 } /*hieu ung di chuyen chuot*/ for (i=0;i<=cursortext.length-1;i++) { document.write("<span id='span"+i+"' class='spanstyle'>") document.write(cursortext[i]) document.write("</span>") } if (document.layers){ document.captureEvents(Event.MOUSEMOVE); } document.onmousemove = MouseMovement; </SCRIPT>
Step 3: Copy & Paste HTML code below in your BODY section
HTML
Code:
<BODY onload=setup()> </body>





Reply With Quote
 #Add to Ads's Reputation  
OldSponsored Ads
Ads AdsPromoter is online
Member
 
Join Date: LongTime
Posts: 1100
Ads is on a distinguished road
Default New Sponsored Ads



This message will go away once you are registered. Also, by registering, you will have access to all post topics, communicate privately with other members (PM), respond to polls, upload graphics, and access other special features! Registration is fast, simple and absolutely free so please Click Here to join our Web Hosting community today!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 05:24 PM.


Powered by vBulletin Version 3.6.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 2.4.0