Skip to content

Instantly share code, notes, and snippets.

@desandro
Created January 28, 2013 18:13
Show Gist options
  • Select an option

  • Save desandro/4657744 to your computer and use it in GitHub Desktop.

Select an option

Save desandro/4657744 to your computer and use it in GitHub Desktop.

Revisions

  1. desandro created this gist Jan 28, 2013.
    70 changes: 70 additions & 0 deletions jquery-layout-review.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,70 @@
    Re: [On layout & web performance](http://kellegous.com/j/2013/01/26/layout-performance/) by Kelly Norton

    <blockquote class="twitter-tweet"><p><a href="https://twitter.com/search/%23lazyweb">#lazyweb</a> Is there any documentation about which jQuery functions/effects trigger layout? re: <a href="http://t.co/y4rRv9lY" title="http://kellegous.com/j/2013/01/26/layout-performance/">kellegous.com/j/2013/01/26/l…</a></p>&mdash; Dave Rupert (@davatron5000) <a href="https://twitter.com/davatron5000/status/295938368955641856">January 28, 2013</a></blockquote>
    <script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

    `getWidthOrHeight()` used in jQuery.fn.width/height

    clientLeft

    + [3180](https://github.com/components/jquery/blob/1.9.0/jquery.js#L3180) jQuery.event.mousehooks.filter
    + [9355](https://github.com/components/jquery/blob/1.9.0/jquery.js#L9355) jQuery.fn.offset

    clientTop

    + [3181](https://github.com/components/jquery/blob/1.9.0/jquery.js#L3181) jQuery.event.mousehooks.filter
    + [9354](https://github.com/components/jquery/blob/1.9.0/jquery.js#L9354) jQuery.fn.offset

    getBoundingClientRect

    + [9349](https://github.com/components/jquery/blob/1.9.0/jquery.js#L9349)-9350 jQuery.fn.offset
    + [9420](https://github.com/components/jquery/blob/1.9.0/jquery.js#L9420) jQuery.fn.position

    innerText

    + [4826](https://github.com/components/jquery/blob/1.9.0/jquery.js#L4826) Sizzle.pseudos.contains

    offsetHeight

    + [1456](https://github.com/components/jquery/blob/1.9.0/jquery.js#L1456) support test
    + [1463](https://github.com/components/jquery/blob/1.9.0/jquery.js#L1463) support test
    + [7039](https://github.com/components/jquery/blob/1.9.0/jquery.js#L7039) getWidthOrHeight
    + [7230](https://github.com/components/jquery/blob/1.9.0/jquery.js#L7230) jQuery.expr.filters.hidden

    offsetParent

    + [9423](https://github.com/components/jquery/blob/1.9.0/jquery.js#L9423) jQuery.fn.position
    + [9447-9449](https://github.com/components/jquery/blob/1.9.0/jquery.js#L9447-L9449) jQuery.fn.offsetParent

    offsetTop

    + [1469](https://github.com/components/jquery/blob/1.9.0/jquery.js#L1469)

    offsetWidth

    + [1462-1468](https://github.com/components/jquery/blob/1.9.0/jquery.js#L1462-L1468) support test
    + [7039](https://github.com/components/jquery/blob/1.9.0/jquery.js#L7039) getWidthOrHeight
    + [7124](https://github.com/components/jquery/blob/1.9.0/jquery.js#L7124) jQuery.cssHooks.width/height
    + [7230](https://github.com/components/jquery/blob/1.9.0/jquery.js#L7230) jQuery.expr.filters.hidden

    scrollLeft and scrollTop

    + [3180](https://github.com/components/jquery/blob/1.9.0/jquery.js#L3180) jQuery.event.mousehooks.filter
    + [9048](https://github.com/components/jquery/blob/1.9.0/jquery.js#L9048) Tween.propHooks.scrollTop, Tween.propHooks.scrollLeft
    + [9354-9355](https://github.com/components/jquery/blob/1.9.0/jquery.js#L9354-L9355) jQuery.fn.offset
    + [9457-9458](https://github.com/components/jquery/blob/1.9.0/jquery.js#L9457-L9458) jQuery.fn.scrollLeft/Top

    offsetX & offsetY

    + [3168](https://github.com/components/jquery/blob/1.9.0/jquery.js#L3168) jQuery.event.mousehooks.props?

    getComputedStyle

    + [1472-1486](https://github.com/components/jquery/blob/1.9.0/jquery.js#L1472-L1486) support test
    + [6894-6898](https://github.com/components/jquery/blob/1.9.0/jquery.js#L6894-L6898) getStyles

    scrollTo

    + [9472](https://github.com/components/jquery/blob/1.9.0/jquery.js#L9472) jQuery.fn.scrollLeft/Top