Fixed position table header relative to parent scrolling DIV element?

Because of my dependencies on other plugins: jScrollPane, Tablesorter etc it was hard to find an ideal plugin solution to my issue So I wrote some code myself :) It's not complete but the crux of it is as follows: $(function() { var $headLength = $("#quotations thead th"). Length; $("#quotations thead th"). Each(function(index) { $thisWidth = $(this).

Attr("width"); //console. Log($thisWidth); $("#quotations tbody tr:first td:eq(" + index + ")"). Attr("width", $thisWidth) }); var $clonedHead = $("#quotations thead") .clone() .

InsertBefore(". W_price_assess . JScrollPaneContainer") .

Wrap(''); $("#quotations thead").hide(); $(". W_price_assess"). Delegate("#quotations_clone thead th", "click", function() { var $this = $(this); var $thIndex = $this.

Index("#quotations_clone thead th"); $("#quotations thead th:eq(" + $thIndex + ")"). Trigger("click"); }); $(". W_price_assess table.

Pricing"). Tablesorter({ // change the multi sort key from the default shift to alt button sortMultiSortKey: 'shiftKey' }); // re-apply zebra striping after sort $(". W_price_assess table.

Pricing"). Bind("sortEnd", function() { $("table. Striped .

Odd"). RemoveClass("odd"); $("table. Striped tbody tr:nth-child(odd)").

AddClass("odd"); }); }) So I am cloning the thead of the table I want and then re-inserting it above the actual table Tablesorter is still active by checking which th element of the new the new thead is clicked and then using jQuery's fabulous trigger method to trigger a click on the associated th in the hidden table head.

Because of my dependencies on other plugins: jScrollPane, Tablesorter etc it was hard to find an ideal plugin solution to my issue. So I wrote some code myself :) It's not complete but the crux of it is as follows: $(function() { var $headLength = $("#quotations thead th"). Length; $("#quotations thead th").

Each(function(index) { $thisWidth = $(this). Attr("width"); //console. Log($thisWidth); $("#quotations tbody tr:first td:eq(" + index + ")").

Attr("width", $thisWidth) }); var $clonedHead = $("#quotations thead") .clone() . InsertBefore(". W_price_assess .

JScrollPaneContainer") . Wrap(''); $("#quotations thead").hide(); $(". W_price_assess").

Delegate("#quotations_clone thead th", "click", function() { var $this = $(this); var $thIndex = $this. Index("#quotations_clone thead th"); $("#quotations thead th:eq(" + $thIndex + ")"). Trigger("click"); }); $(".

W_price_assess table. Pricing"). Tablesorter({ // change the multi sort key from the default shift to alt button sortMultiSortKey: 'shiftKey' }); // re-apply zebra striping after sort $(".

W_price_assess table. Pricing"). Bind("sortEnd", function() { $("table.

Striped . Odd"). RemoveClass("odd"); $("table.

Striped tbody tr:nth-child(odd)"). AddClass("odd"); }); }); So I am cloning the thead of the table I want and then re-inserting it above the actual table. Tablesorter is still active by checking which th element of the new the new thead is clicked and then using jQuery's fabulous trigger method to trigger a click on the associated th in the hidden table head.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions