Skip to content

Instantly share code, notes, and snippets.

@Error-331
Created May 2, 2012 11:42
Show Gist options
  • Select an option

  • Save Error-331/2576009 to your computer and use it in GitHub Desktop.

Select an option

Save Error-331/2576009 to your computer and use it in GitHub Desktop.

Revisions

  1. Error-331 created this gist May 2, 2012.
    13 changes: 13 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    Compatibility
    =============

    scrollWidth and scrollHeight
    ----------------------------

    Not proper in IE 5.5, 6, 7 (http://www.quirksmode.org/dom/w3c_cssom.html), use something like this:

    if (navigator.appName == 'Microsoft Internet Explorer' && (document.compatMode == undefined || document.compatMode != 'CSS1Compat'))
    {
    this.WinHeight = Math.max(document.body.scrollHeight, document.body.clientHeight) + 'px';
    this.IsQuirks = true
    }