All for Joomla All for Webmasters

Figura elástica com o mouse

Cole depois da tag <body>.

Troque http://www.seublog.com.br/nome da figura.jpg pelo link da figura hospedada que deseja usar.

<IMG width=130 height=130 id=Om src="http://www.seublog.com.br/nome da figura.jpg" style="LEFT: -1100px; POSITION: absolute">

<SCRIPT>

ddx=0;ddy=0;PX=0;PY=0;xm=0;ym=0

OmW=(Om.width/2)+70;OmH=(Om.height/2)+50

document.body.style.cursor="hand"

function Ouille(){

x=Math.round(PX+=(ddx+=((xm-PX-ddx)*3)/100))

y=Math.round(PY+=(ddy+=((ym-PY-ddy)*3-300)/100))

Om.style.left=x-OmW

Om.style.top=y-OmH

elastoc.to=x+","+y

elastoc.strokecolor="RGB(00,00,00)"

setTimeout("Ouille()",1)

}

function momouse(){

xm=window.event.x

ym=window.event.y

elastoc.from=xm+","+ym

}

if(ScriptEngineMajorVersion()==5 && ScriptEngineMinorVersion()==5){

code="<v:line id=elastoc style='LEFT:0;POSITION:absolute;TOP:0' strokeweight='none'></v:line>"} else {

code="<v:group style='LEFT:-10;WIDTH:100pt;POSITION:absolute;TOP:0;HEIGHT:100pt' coordsize='21600,21600'><v:line id=elastoc 

style='LEFT:0;WIDTH:100pt;POSITION:absolute;TOP:0;HEIGHT:100pt' strokeweight='none'></v:line></v:group>"}

document.body.insertAdjacentHTML("afterBegin",code)

document.onmousemove=momouse

Ouille()

</SCRIPT>