docwhat's avatardocwhat's blog

Switched from YUI to jQuery

I just switched my (rather limited) JavaScript from YUI to jQuery.

jQuery took a little (a couple hours) to learn how to write something close to idiomatic code. My new code is much smaller and easier to read.

Why did I switch away from YUI you might ask?

A couple reasons:

  1. jQuery has a bunch of idiomatic constructs to make what I’m doing here much easier: Example:
$('table tbody tr:even').each(function () {
    $(this).addClass('alt')
})
  1. jQuery is smaller.
  2. I use YUI at work.
  3. I just wanted to try something new.

Ciao!

Edit on GitHub