Sorry about all the alert boxes they should be gone now, also thank
you for the shorter code I was going to make the code shorter once I
got this error worked out and you just saved me sometime ;) ... but I
still have the same issue I cannot get $("area").hover(or mouseover)
to work in IE.

On Jan 14, 9:00 pm, James Van Dyke <jame...@gmail.com> wrote:
> Ok... that's a hard page to get away from with all those alert boxes.
> I know... no Firebug in IE.  Poo.
>
> I believe that "class" is not what IE calls that attribute.  For
> instance, element.class will return nothing.  element.className is the
> correct property.  Try that.
>
> Plus, you could shorten your code and make it a bit more readable:
>
> $("area").mouseover( function(){
>     $("#" . $(this).attr("class")).addClass('selected');}.mouseout( 
> function() {
>
>     $("#" . $(this).attr("class")).removeClass('selected');
>
> };
>
> Let me know how that works out.
>
> On Jan 14, 6:30 pm, Chrisw <chris.p.wel...@gmail.com> wrote:
>
> > sorry if this is a repost but I didn't see it in the group and I
> > didn't get a copy in my email. I am working with an image map and i am
> > using the maphilight plugin and I want to add a border to an image
> > below the image map  when a user hovers over an area (based on the
> > iamges ID and the area's class)(see code below) I got it to work in FF
> > but I cannot get it to work in IE. Any help?
>
> > URL:http://oregonstate.edu/admissions/firstyear/recruitmap/map/
>
> > Code:
> >                         $("area").hover(function(){
> >                                 var stateClass;
> >                                 stateClass = $(this).attr("class");
> >                                 var stateClassQuery;
> >                                 stateClassQuery = "#"+stateClass;
> >                                 alert(stateClassQuery);//for testing
> >                                 $(stateClassQuery).addClass('selected');
> >                         //mouse out
> >                                 },
> >                                 function(){
> >                                 var stateClass;
> >                                 stateClass = $(this).attr("class");
> >                                 var stateClassQuery;
> >                                 stateClassQuery = "#"+stateClass;
> >                                 $(stateClassQuery).removeClass('selected');
> >                                 }

Reply via email to