Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] hiding single td cells
- From: sclay at ufl.edu (Steve Clay)
- Subject: [Javascript] hiding single td cells
- Date: Tue Apr 25 08:34:56 2006
Tuesday, April 25, 2006, 8:54:20 AM, Michael Borchers wrote:
>> Where are you testing? Internet Explorer doesn't support display:
>> table-cell. You should toggle between "none" and "".
> and thanks to IE :(
IE not supporting table display properties does cause this particular
problem, but resetting style properties to an empty string is a good
general method of allowing element style properties to return to their
value defined in the CSS.
For example, a generic "toggle" script should toggle display between "none"
and "" (instead of "block") because you can then safely restore inline
elements, table cells, table rows, etc.
One thing to look out for is that Safari may require you to reset each
property of a shorthand property. If you set el.style.background = 'red',
to restore the background completely you need:
with (el.style) {
background = backgroundColor = backgroundImage = backgroundRepeat =
backgroundAttachment = backgroundPosition = '';
}
Another reason why classNames are the way to go if you can.
Steve
--
http://mrclay.org/
- Follow-Ups:
- [Javascript] hiding single td cells
- From: Roger Roelofs
- [Javascript] hiding single td cells
- References:
- [Javascript] hiding single td cells
- From: Michael Borchers
- [Javascript] hiding single td cells
- From: David Dorward
- [Javascript] hiding single td cells
- From: Michael Borchers
- [Javascript] hiding single td cells
- From: David Dorward
- [Javascript] hiding single td cells
- From: Michael Borchers
- [Javascript] hiding single td cells
- Prev by Date: [Javascript] hiding single td cells
- Next by Date: [Javascript] hiding single td cells
- Previous by thread: [Javascript] hiding single td cells
- Next by thread: [Javascript] hiding single td cells
- Index(es):