Skip to content
Permalink
Browse files

offset: do not add borders for table cells

  • Loading branch information
brandonaaron committed Sep 18, 2007
1 parent d5999be commit c9899a74ac7b7ddb8663f4aa074c1c05f6514e5a
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/offset.js
@@ -43,7 +43,7 @@ jQuery.fn.offset = function() {

// Mozilla and Safari > 2 does not include the border on offset parents
// However Mozilla adds the border for table cells
if ( mozilla && /^t[d|h]$/i.test(parent.tagName) || !safari2 )
if ( mozilla && !/^t[d|h]$/i.test(offsetParent.tagName) || safari && parseInt(version) >= 522 )
border( offsetParent );

// Safari <= 2 doubles body offsets with an absolutely positioned element or parent

0 comments on commit c9899a7

Please sign in to comment.
You can’t perform that action at this time.