Jump to content

[Resolvido] caixinha com info on mouseover


[LPGA]volumes
 Share

Recommended Posts

Ois

Esta eh uma maneira simples de o fazer, ha outras maneiras mais complicadas e melhores.

Aqui vai :

<html>
<head>
<title>Img</title>
<script language="JavaScript">
function HandleMouseMove()
{
MyInfo.style.display = "block";
MyInfo.style.posLeft = window.event.clientX + 10;
MyInfo.style.posTop = window.event.clientY;
}

function HandleMouseOut()
{
MyInfo.style.display = "none";
}
</script>
</head>
<body>
<img href="HrefDaImagem" onmousemove="HandleMouseMove()" onmouseout="HandleMouseOut()">
<div id="MyInfo" style="width:1; border:1 solid #000000; display:none; position:absolute;">AEIOU</div>
</body>
</html>

Espero ter ajudado.

Skin: Adicionei Geshi

Se a vida te voltar as costas aproveita e apalpa-lhe o cu.

Link to comment
Share on other sites

a função que está no Btuga é esta (em javascript):

function stm(t,s){
if(MI_sNav&&isOK){	
if(document.onmousemove!=mig_mo||w.onresize!=mig_re) mig_hand()
if(fl&&s[17]>-1&&s[18]>0)mig_layCss().visibility="hidden"
var ab="";var ap=""	
var titCol=s[0]?"COLOR='"+s[0]+"'":""
var titBgCol=s[1]&&!s[2]?"BGCOLOR='"+s[1]+"'":""
var titBgImg=s[2]?"BACKGROUND='"+s[2]+"'":""
var titTxtAli=s[3]?"ALIGN='"+s[3]+"'":""
var txtCol=s[6]?"COLOR='"+s[6]+"'":""
var txtBgCol=s[7]&&!s[8]?"BGCOLOR='"+s[7]+"'":""
var txtBgImg=s[8]?"BACKGROUND='"+s[8]+"'":""
var txtTxtAli=s[9]?"ALIGN='"+s[9]+"'":""
var tipHeight=s[13]? "HEIGHT='"+s[13]+"'":""
var brdCol=s[15]? "BGCOLOR='"+s[15]+"'":""
if(!s[4])s[4]="Verdana,Arial,Helvetica" 
if(!s[5])s[5]=1 
if(!s[10])s[10]="Verdana,Arial,Helvetica" 
if(!s[11])s[11]=1
if(!s[12])s[12]=200
if(!s[14])s[14]=0
if(!s[16])s[16]=0
if(!s[24])s[24]=10
if(!s[25])s[25]=10
hs=s[22]
if(MI_pSub==20001108){
if(s[14])ab="STYLE='border:"+s[14]+"px solid"+" "+s[15]+"'";
ap="STYLE='padding:"+s[16]+"px "+s[16]+"px "+s[16]+"px "+s[16]+"px'"}
var closeLink=hs==3?"<TD ALIGN='right'><FONT SIZE='"+s[5]+"' FACE='"+s[4]+"'><A HREF='javascript:void(0)' ONCLICK='mig_hide(0)' STYLE='text-decoration:none;color:"+s[0]+"'><B>Close</B></A></FONT></TD>":""
var title=t[0]||hs==3?"<TABLE WIDTH='100%' BORDER='0' CELLPADDING='0' CELLSPACING='0' "+titBgCol+" "+titBgImg+"><TR><TD "+titTxtAli+"><FONT SIZE='"+s[5]+"' FACE='"+s[4]+"' "+titCol+"><B>"+t[0]+"</B></FONT></TD>"+closeLink+"</TR></TABLE>":"";
var txt="<TABLE "+ab+" WIDTH='"+s[12]+"' BORDER='0' CELLSPACING='0' CELLPADDING='"+s[14]+"' "+brdCol+"><TR><TD>"+title+"<TABLE WIDTH='100%' "+tipHeight+" BORDER='0' CELLPADDING='"+s[16]+"' CELLSPACING='0' "+txtBgCol+" "+txtBgImg+"><TR><TD "+txtTxtAli+" "+ap+" VALIGN='top'><FONT SIZE='"+s[11]+"' FACE='"+s[10]+"' "+txtCol +">"+t[1]+"</FONT></TD></TR></TABLE></TD></TR></TABLE>"
mig_wlay(txt)
tb={trans:s[17],dur:s[18],opac:s[19],st:s[20],sc:s[21],pos:s[23],xpos:s[24],ypos:s[25]}
if(MI_IE4)mig_layCss().width=s[12]
e_d=mig_ed()
Count=0
move=1
}}

depois é só chamares com o evento onhover com um código do género:

stm(['Helloween-Walls_Of_Jericho_(Exp','Grupo: Musica<br>Tipo: Hard-Rock - Metal - Punk<br>Ano: 2006'],Style[0])

Daniel Correia

Link to comment
Share on other sites

Ois

Pois essa function eh a k eles usam no btuga,  mas desde ja te digo k nao vai funcionar como ta pq faltam functions como mig_ed(), mig_layCss(), mig_wlay(),  etc.

Eu axo k devias tentar fazer uma tua, mesmo k seija mais simples, se nao, nao aprendes nada e acabas por andar sempre a roubar o codigo dos outros.

Se a vida te voltar as costas aproveita e apalpa-lhe o cu.

Link to comment
Share on other sites

Ois

Esta eh uma maneira simples de o fazer, ha outras maneiras mais complicadas e melhores.

Aqui vai :

<html>
<head>
<title>Img</title>
<script language="JavaScript">
function HandleMouseMove()
{
MyInfo.style.display = "block";
MyInfo.style.posLeft = window.event.clientX + 10;
MyInfo.style.posTop = window.event.clientY;
}

function HandleMouseOut()
{
MyInfo.style.display = "none";
}
</script>
</head>
<body>
<img href="HrefDaImagem" onmousemove="HandleMouseMove()" onmouseout="HandleMouseOut()">
<div id="MyInfo" style="width:1; border:1 solid #000000; display:none; position:absolute;">AEIOU</div>
</body>
</html>

Espero ter ajudado.

era mesmo isto! muito obrigado!

obrigado a todos pela ajuda.

cumprimentos.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.