Love programming before we shared a considerable number of jquery menu, today to bring you a dock-style jquery menu, with Apple's friends know that its dock menu is very cool, with beautiful icons more gorgeous. As follows:
Online preview Source Download
The implemented code.
HTML code:
<DivID= "wrapper"> <imgsrc= "Images/1.png"width= " +"> <imgsrc= "Images/2.png"width= " +"> <imgsrc= "Images/3.png"width= " +"> <imgsrc= "Images/4.png"width= " +"> <imgsrc= "Images/5.png"width= " +"></Div>
JS Code:
Window.onload=function() {Document.onmousemove=function(EV) {varoevent=ev| |event; varAimg=document.getelementsbytagname (' img '); varOdiv=document.getelementbyid (' wrapper '); for(vari=0;i<aimg.length;i++){ varX=AIMG[I].OFFSETLEFT+AIMG[I].OFFSETWIDTH/2;varY=AIMG[I].OFFSETTOP+ODIV.OFFSETTOP+AIMG[I].OFFSETHEIGHT/2;vara=x-Oevent.clientx; varb=y-Oevent.clienty; varDis=parseint (Math.sqrt (a*a+b*b)); varscale=1-dis/200;if(scale<0.5) { scale=0.5; } aimg[i].width=scale*128; } } }
via:http://www.w2bc.com/article/19605
Apple Dock-style menu based on jquery