SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
-
Apr 10, 2008, 19:35 #1
- Join Date
- Nov 2000
- Location
- Chico, Ca
- Posts
- 1,125
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Javascript Style not persisting in IE7
http://preview.chucksoft.com/teledirect/home.html
It works in Safari and Firefox. Anyone have any idea's what I am doing wrong?
Thanks,
Chuck"Happiness doesn't find you, you find happiness" -- Unknown
www.chuckknows.com
-
Apr 10, 2008, 19:40 #2
- Join Date
- May 2006
- Posts
- 18
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
-
Apr 10, 2008, 20:31 #3
- Join Date
- Nov 2000
- Location
- Chico, Ca
- Posts
- 1,125
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Doh! Totally made sense to me, forgot about the other people.
So the issue is in the middle of the page there are What, who, when... etc.
In Firefox, when you hover these the background color changes. So the last one you hovered over is always the darker blue. The background color persists on the last one you hovered over.
In IE this is not the case. Once the mouse is moved off, the area returns back to the lighter blue. I want it to stay the darker blue. One of the items will always be selected.
Any clue why this is happening in IE7?
Thanks,
Chuck"Happiness doesn't find you, you find happiness" -- Unknown
www.chuckknows.com
-
Apr 12, 2008, 17:26 #4
- Join Date
- Nov 2000
- Location
- Chico, Ca
- Posts
- 1,125
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
"Happiness doesn't find you, you find happiness" -- Unknown
www.chuckknows.com
-
Apr 14, 2008, 09:16 #5
- Join Date
- Nov 2004
- Location
- Nelson BC
- Posts
- 2,310
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
IE doesn't like these lines:
linkElements[i].removeAttribute('style');
element.setAttribute('style', 'background-color:#345f8a;');
I replaced them with:
linkElements[i].style.backgroundColor = "";
element.style.backgroundColor = "#345f8a";
and it worked
Bookmarks