»
EnglishFrenchVietnamese

Print - Cool Linkmarker with DHTML-animated circle - JavaScriptBank.com

Full version: jsB@nk » Image » Cool Linkmarker with DHTML-animated circle
URL: https://www.javascriptbank.com/cool-linkmarker-with-dhtml-animated-circle.html

Cool Linkmarker with DHTML-animated circle © JavaScriptBank.comThis JavaScript makes many picure fly circle when user drag mouse on specified link. Draw more attention with this unique onMouseover-effect for all kinds of links. Cross-browserIE4.x and NN4.x

Full version: jsB@nk » Image » Cool Linkmarker with DHTML-animated circle
URL: https://www.javascriptbank.com/cool-linkmarker-with-dhtml-animated-circle.html



CSS
<STYLE>.spanstyle {COLOR: #ff0000; FONT-FAMILY: Verdana; FONT-SIZE: 10pt; POSITION: absolute; TOP: -50px; VISIBILITY: visible}.explain {COLOR: #000000; FONT-FAMILY: Arial; FONT-SIZE: 9pt; FONT-WEIGHT: bold; LEFT: 10px; POSITION: relative; TEXT-ALIGN: center; TOP: 40px; WIDTH: 100%;}A {COLOR: #000000; FONT-FAMILY: Arial,Helvetica,sans-serif; TEXT-DECORATION: underline}A:visited {COLOR: #000000}</STYLE><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


JavaScript
<SCRIPT><!-- Beginning of JavaScript -var x,yvar step=5var flag=1var pausevar timersmallvar timerbigvar isbigcircle=1var pause=50var bigradiusvar smallradius=50var startwinkel=1var imgnumber=12var imgsrc="gif_logojsb2.gif"var xcentervar ycentervar pi= Math.PIfunction onresizer() {clearTimeout(timerbig)clearTimeout(timersmall)initiate()}function initiate() {var initiatetimer=setTimeout("initiate2()",2000)}function initiate2() {if (document.layers) {xcenter=Math.floor(screen.width/2)ycenter=Math.floor(window.innerHeight/2)}if (document.all) {xcenter=Math.floor(document.body.clientWidth/2)ycenter=Math.floor(document.body.clientHeight/2)}bigradius=ycenterbigcircle()}function handlerMM(e){x = (document.layers) ? e.pageX : event.clientXy = (document.layers) ? e.pageY : event.clientYflag=1}function bigcircle() {if (isbigcircle==1) {if (document.all) {for (i=1; i<=imgnumber; i++) {    var thisspan = eval("document.all.span"+(i)+".style")    thisspan.posLeft=((xcenter-20)*Math.cos(startwinkel*(pi/180)))+xcenterthisspan.posTop=((ycenter-20)*Math.sin(startwinkel*(pi/180)))+ycenterstartwinkel=startwinkel+30    }}if (document.layers) {for (i=1; i<=imgnumber; i++) {    var thisspan = eval("document.span"+i)    thisspan.left=((xcenter-150)*Math.cos(startwinkel*(pi/180)))+(xcenter-145)thisspan.top=((ycenter-20)*Math.sin(startwinkel*(pi/180)))+ycenterstartwinkel=startwinkel+30    }}step=step+5startwinkel=steptimerbig=setTimeout("bigcircle()",pause)}else {isbigcircle=0clearTimeout(timerbig)}}function presmallcircle() {isbigcircle=0clearTimeout(timerbig)smallcircle()}function prebigcircle() {isbigcircle=1clearTimeout(timersmall)bigcircle()}function smallcircle() {if (isbigcircle==0) {if (document.all) {for (i=1; i<=imgnumber; i++) {    var thisspan = eval("document.all.span"+(i)+".style")    thisspan.posLeft=(smallradius*Math.cos(startwinkel*(pi/180)))+xthisspan.posTop=(smallradius*Math.sin(startwinkel*(pi/180)))+ystartwinkel=startwinkel+30    }}if (document.layers) {for (i=1; i<=imgnumber; i++) {    var thisspan = eval("document.span"+i)    thisspan.left=(smallradius*Math.cos(startwinkel*(pi/180)))+xthisspan.top=(smallradius*Math.sin(startwinkel*(pi/180)))+ystartwinkel=startwinkel+30    }}step=step+5startwinkel=steptimersmall=setTimeout("smallcircle()",pause)}else {isbigcircle=0clearTimeout(timersmall)}} window.onoad=initiate()// - End of JavaScript - --></SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<DIV class=explain id=source><A href="http://javascriptbank.com/" onmouseout=prebigcircle() onmouseover=presmallcircle() target=_blank>Move your mouse over this link</A></DIV><SCRIPT><!-- Beginning of JavaScript -for (i=1;i<=imgnumber;i++) {    document.write("<span id='span"+i+"' class='spanstyle'>")document.write("<img src='"+imgsrc+"'>")    document.write("</span>")}if (document.layers){document.captureEvents(Event.MOUSEMOVE);}document.onmousemove = handlerMM;document.onresize = onresizer;// - End of JavaScript - --></SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->