Bug Tracker

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#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:


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 timmywil

Component: unfiledcss
Priority: undecidedlow
Resolution: invalid
Status: newclosed

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.


comment:2 Changed 11 years ago by OBCENEIKON

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 dmethvin

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 timmywil

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.

Note: See TracTickets for help on using tickets.