View Full Version : this.style.cursor not working in ie
mikken
August 13th, 2007, 05:15 AM
Hi people, i can't get this code to work in IE (works fine in FF and O):
onmouseover="this.style.cursor='pointer'"
I use the mouseover in an imagemap. I have a display: block style attached to the <area>'s to make it work in FF and O, but that trick doesn't seem to cut it in IE.
Clues, anyone?
http://fantasticnorway.no
mikken
August 16th, 2007, 04:44 PM
*nag*
DDD
August 16th, 2007, 05:06 PM
this may or may not help. You may have to get clever with the placement of the elements
http://www.frankmanno.com/ideas/css-imagemap/
http://www.cssplay.co.uk/menu/imap.html
mikken
August 16th, 2007, 05:20 PM
Those links look interesting, gonna look at them closer when i can keep my eyes up. I'm in no shape for cleverness now.
Thanks!
denizengt
August 16th, 2007, 08:27 PM
Try:
onmouseover="this.style.cursor='hand'"
denizengt
August 16th, 2007, 09:00 PM
Better still, make a class such as
.pointer{
cursor:pointer;
cursor:hand;
}
Then use jquery to change the class on a mouseover event, rather than use inline, obtrusive Javascript
For example, we have a div called "blah" we want mouseover effects on...
<div class = "blah"> I am an evil div</div>
Then in the head or a seperate file you'd add:
<script language="JavaScript" type="text/javascript">
//When ready, fire init to set up mouseover actions
$(document).ready(init);
function init(){
$("div.blah").mouseover(function(){
$(this).addClass("pointer");
} );
}
</script>
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.