[jQuery] scrollable table with fixed (but flexible :P ) headers
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7650.28">
<TITLE>scrollable table with fixed (but flexible :P ) headers</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>Hey guys,<BR>
<BR>
I want to put a large data table in a (fixed-size) container div, to make it a scrollable table.<BR>
Doing this for a fixed width table isn;t quite hard, but the width of my table is not fixed at all.<BR>
<BR>
I now have two divs, both containing its own table.<BR>
Top div table contains one row (the headers) and the div is not scrollable.<BR>
Bottom div ocntains the actual table and is scrollable.<BR>
<BR>
To make the two tables have the same col widths i get the width of the main table columns onload, and make the column widths of the second header match the main ones by using a spacer img (with a set width).. Not quite bulletproof but i don't know how else to do that...<BR>
<BR>
I am able to bind a scroll event to the main div, and fetch the pixels scrolled with the scrollLeft method in dimensions. Multiplying the scrollLeft value with -1 gives me the X offset for the table...<BR>
<BR>
But how can i set that x-offset? (using " .css('left',value)" doesnt seem to work at all)...<BR>
Do i need to do this differently?<BR>
<BR>
Any help is appreciated, thganks.<BR>
<BR>
Here's a non jquery example to give u guys an idea:<BR>
<A HREF="http://www.litotes.demon.co.uk/example_scripts/tableScroll.html">http://www.litotes.demon.co.uk/example_scripts/tableScroll.html</A><BR>
(although i dont need the vertical hdr cells...)<BR>
<BR>
Don't have the code here, i can post some code once i get my usb mem stick if needed, and that'll be later today...<BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/