Performance: Pure CSS vs jQuery -


i've seen number of code comparisons between pure css , equivalent jquery. i'm looking details why pure css definitively faster jquery.

here's of reasons i've seen these descriptions not in-depth. i'm not sure if true.

  • css doesn't have evaluated browser
  • jquery has evaluated browser
  • jquery goes through scripting language

doesn't css have evaluated browser , goes through scripting language? doesn't css have walk dom jquery or css have advantage there?

  • css doesn't have evaluated browser

    no. css language write stylesheets in, have loaded, parsed , evaluated browser; see below.

  • jquery has evaluated browser

    yes, because...

  • jquery goes through scripting language

    yes. jquery written in javascript which, css, language has parsed , evaluated browser; again, see below.

doesn't css have evaluated browser , goes through scripting language?

it has evaluated browser, language in own right, it's implemented in native code other core language features of layout engine, html parser , javascript engine. css implementation not happen through scripting language (unless, of course, layout engine written in one).

css styles exposed scripting languages via cssom, not css implementation itself, scripting api consider sort of css equivalent dom html.

jquery written in javascript, run browser's javascript implementation. if use jquery apply css, jquery has access dom , cssom, again implemented in javascript, browser has run.

this similar using jquery selectors versus native selectors api. jquery selectors implemented in sizzle, javascript selector library, while document.queryselector() dom method allows use browser's natively-implemented selector engine directly script.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -