KWPro.net

Javascript/CSS Display Issue
By: conark
Published On: 3-6-2008

I ran into a rather frustrating problem that I only solved the other day.  It was that I had embedded a stylesheet within the HTML using the style tags.  Inside, I used the ID selector to style a particular div element.  In particular, I used a kind of display: none; thing.

Well, one of the things I needed was to be able to make that part visible again once a person unchecked that element.  Before I was doing something like $(ele).style.display = '';.  Turns out, that the precedence of Javascript is lower than the one in inline style.  So to rectify this, I had to instead do $(ele).style.display = 'block' (or inline).  Pretty annoying but a nice little fix to this problem.

AddThis Social Bookmark Button Sphere: Related Content

Trackbacks: (Trackback URL)

No Comments Posted Yet
July [August] September
Sun Mon Tue Wed Thu Fri Sat
31 1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31 1 2 3