#11266 closed bug (invalid)
toggle() does not work on col or colgroup
Reported by: | OBCENEIKON | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | css | Version: | 1.7.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
jQuery Version: 1.7.1
Browser: Safari 5.1.2 (7534.52.7)
OS: Mac OS X 10.7.2 Build 11C74
Toggling a column does not work on a colgroup.
Clicking "Hide Cells" should make the red cells disappear, but instead hides just the cells and applies the col and colgroup to the remaining cell.
Change History (4)
comment:1 Changed 11 years ago by
Component: | unfiled → css |
---|---|
Priority: | undecided → low |
Resolution: | → invalid |
Status: | new → closed |
comment:2 Changed 11 years ago by
Even after your change, removing this_class from the col elements, the colgroup is still displaying. The third column should not be a red color after hiding the first two columns.
I did find a way to make the colgroup hide and that was to set the visibility to collapse and display none.
Example: http://jsfiddle.net/zLJvS/5/
comment:3 Changed 11 years ago by
Since .toggle() is about toggling the visibility of target elements and col/colgroup elements are never visible, I'm not even sure it's a valid use case. Using a class name is probably better.
comment:4 Changed 11 years ago by
Browsers probably differ on whether to apply the rules of a colgroup to their respective columns when display is none. The 3rd column is not red in Chrome in my fiddle. Regardless of whether my assumption was correct, this is really not something jQuery can tackle.
This is not a jQuery issue. I think the browser is getting confused by the placement of "this_class" on the cols, which is unnecessary.
http://jsfiddle.net/zLJvS/4/