Lee Tickett
Lee Tickett

Reputation: 6027

Resizable table columns with jQuery (table wider than page)

I'm looking for a relatively simple solution to allow table column resizing. There's a similar question:

Resizable table columns with jQuery

I really like the simple solution; jsfiddle.net/ydTCZ/

But it doesn't work on my table (it seems to be because the table is wider than the screen). If i simplify my table to just a couple of columns it works fine.

Upvotes: 0

Views: 1922

Answers (1)

Lee Tickett
Lee Tickett

Reputation: 6027

Cracked it.

The contents of my column headers <th>s are links (<a>s).

Instead of doing anything with the <th> I had to set the style of the <a>s to display: block

Then just $('th a').resizable({handles:'e'});

I should note I have both jQuery and jQuery UI loaded. JSFiddle example; http://jsfiddle.net/u32a1ccL/

Upvotes: 2

Related Questions