Fair enough.
And yeah, I do want the image map, unless there's another way to make a circular reaction area without using flash to make the whole project. Pretty much the only reason with this is that with my images, there would be a 30x30x42-pixel triangle of white space at each corner that activated the rollover long before your cursor hit the actual visible image. Which for my portfolio would seem just.. gross, I guess.
Anyway, here's the code:
Code:
<html>
<head>
<script type="Javascript">
$('area').each(function(){
var area = $(this),
alt = area.attr('alt');
area.mouseover(function(){
$('#overlay').html(alt);
}).mouseout(function(){
$('#overlay').html('');
});
});
</script>
<style type="text/css">
#map {
position: relative;
}
#overlay {
color:#ff0000;
background-image: url(http://i69.photobucket.com/albums/i55/iyasu_yosomono/looky.png);
position: absolute;
color: #fff;
top: 0px;
left: 0px;
}
</style>
</head>
<body>
<div id="map">
<div id="overlay"></div>
<img src="http://i69.photobucket.com/albums/i55/iyasu_yosomono/listen.png" width="145" height="145"
alt="Planets" usemap="#planetmap" />
</div>
<map name="planetmap">
<area shape="circle" coords="72,72,59" href="#"
alt='<img src="http://i69.photobucket.com/albums/i55/iyasu_yosomono/looky.png">'
id='<img src="http://i69.photobucket.com/albums/i55/iyasu_yosomono/listen.png">'/>
</map>
</body>
</html>
Um. For some reason when I copy the code from jsFiddle into a .txt and save it in a .html file, the flickering doesn't happen, but it doesn't do the rollover state, either. Don't know what's up with that...
If you want, though, you can Google "jsFiddle." It's a pretty legit developer site for working on all of CSS, JS, and HTML in one window, automatically combining the three into a result pane that shows you what it looks like. Cheap, but useful, I guess.
Anyway,
Thanks again.
PS--Um. would it be possible to tweak your above code to make the doThis command call up something that would bring another image into play, be it via overlapping div or image map, instead of the alert box?