/    Sign up×
Community /Pin to ProfileBookmark

Code to make image float up on mouseover?

On one of my test sites I have an image that when you mouseover it has an enlarged image with description pop up which floats or aligns downward (default). Does anyone know the code or tag to make it float/align upward?

These images are near the bottom of the page so I want the pop up to pop up into the page and not down below the page line.

[url]http://www.ilovelincolnnebraska.com/test7.htm[/url]

Thanks
Bob

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@vwphillipsSep 11.2011 — [CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
<title></title>
<style type="text/css">
/*<![CDATA[*/
.pop {
position:absolute;visibility:hidden;left:-70px;top:10px;border:solid red 0px;
}

/*]]>*/
</style>

<script type="text/javascript">
/*<![CDATA[*/

function zxcPop(id,ud,ms,zindex){
var obj=document.getElementById(id);
if (!obj.oop){
obj.oop=new zxcPopOOP(obj,ms,zindex);
}
var oop=obj.oop;
clearTimeout(oop.dly);
oop.animate(obj,oop.now,oop.mm[ud?0:1],new Date(),oop.ms);
obj.style.visibility='visible';
oop.div.style.zIndex=oop.zindex+(ud?10:0)+'';
}

function zxcPopOOP(obj,ms,zindex){
var p=obj.parentNode,img=p.getElementsByTagName('IMG')[0];
this.mm=[-obj.height+img.height,0];
this.ms=typeof(ms)=='number'?ms:1000;
this.zindex=typeof(zindex)=='number'?zindex:10;
this.div=p.parentNode;
this.now=0;
}

zxcPopOOP.prototype={

animate:function(obj,f,t,srt,mS){
var oop=this,ms=new Date().getTime()-srt,now=(t-f)/mS*ms+f,bimg;
if (isFinite(now)){
obj.style.top=now+'px';
this.now=now;
}
if (ms<mS){
oop.dly=setTimeout(function(){ oop.animate(obj,f,t,srt,mS); },10);
}
else if (t==0){
obj.style.visibility='hidden';

}
}

}



/*]]>*/
</script>
</head>

<body>
<div style='position:absolute;margin-left:264px;margin-top:592px;width:96px;height:96px;z-index:15'>
<a href="http://www.ilovelincolnnebraska.com/?q=node/6">
<img style="border:0px solid black" src="http://www.ilovelincolnnebraska.com/HPImages/AstreetNamedO1.JPG" name="street" border="0" onmouseover="zxcPop('pop1',true,1000,15);" title="A Street Named O" />
<img id="pop1" class="pop" src="http://www.ilovelincolnnebraska.com/HPImages/O_street_pop1.jpg" onmouseout="zxcPop('pop1',false);"/>
</a>
</div>
<div style='position:absolute;margin-left:424px;margin-top:592px;width:96px;height:96px;z-index:15'>
<a href="http://www.ilovelincolnnebraska.com/?q=node/6">
<img style="border:0px solid black" src="http://www.ilovelincolnnebraska.com/HPImages/AstreetNamedO1.JPG" name="street" border="0" onmouseover="zxcPop('pop2',true,1000,15);" title="A Street Named O" />
<img id="pop2" class="pop" src="http://www.ilovelincolnnebraska.com/HPImages/O_street_pop1.jpg" onmouseout="zxcPop('pop2',false);"/>
</a>
</div>

</body>

</html>[/CODE]
Copy linkTweet thisAlerts:
@WherebobauthorSep 12.2011 — Wow thanks a lot Vic I'll try that
×

Success!

Help @Wherebob spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.24,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...