Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 7th, 2012  |  syntax: None  |  size: 0.51 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. // Plugin
  2. $.fn.iWouldLikeToAbsolutelyPositionThingsInsideOfFrickingTableCellsPlease = function() {
  3.     var $el;
  4.     return this.each(function() {
  5.         $el = $(this);
  6.         var newDiv = $("<div />", {
  7.                 "class": "innerWrapper",
  8.                 "css"  : {
  9.                         "height"  : $el.height(),
  10.                         "width"   : "100%",
  11.                         "position": "relative"
  12.                 }
  13.         });
  14.         $el.wrapInner(newDiv);    
  15.     });
  16. };
  17.  
  18. // DOM Ready
  19. $(function() {
  20.         // Usage
  21.         $("th, td").iWouldLikeToAbsolutelyPositionThingsInsideOfFrickingTableCellsPlease();
  22. });