How do I change the border of an image map(on mouse over) that i have placed over a part of the image
+1
A:
You can use jQuery:
$('#imagemapid').mouseover(function() {
$(this).css("border","solid 1px red");
});
Ropstah
2009-06-02 12:59:45
+1
A:
If you do use jQuery, which would be wise, use hover so you can remove the border as well.
$('#imagemapid').hover(
function() {
$(this).css("border","solid 1px red");
},
function() {
$(this).css("border","none");
}
);
altCognito
2009-06-02 13:03:40
+1
A:
Since you ask in javascript then I'll fist show your desired solution
function imageon(here)
{
var elem= document.getElementById(here);
elem.style.border = "solid 2px grey";
}
in jquery you can just do this
$(function(){
$('#d1').mouseover(function() {
$(this).css("border","solid 2px grey");
});
});
with html like this
<img name="d1" id="d1" href="LINK #1" onmouseover="imageon('d1');" >
TStamper
2009-06-02 13:17:13