First and foremost let me say that I'm not doing this to save 16 bytes. Ellis was just curious what it would be gzip'd so after a discussion he ran some tests and I added it to the post.
Furthermore, I agree, to an extent, that it makes the code slightly less readable, but no more than saving a measly 16 bytes. And personally, if you AREN'T a jQuery developer the syntax above is easier to write and easier to remember imo. And if you ARE a jQuery developer it saves time, especially in larger projects.
In the end it's a preference of syntax, so if given two options, I'll often choose the one that's easier to type. Personal preference I guess. Nonetheless, the comments are greatly appreciated and valid points have been raised.
Less clear? Eh, ok...
First and foremost let me say that I'm not doing this to save 16 bytes. Ellis was just curious what it would be gzip'd so after a discussion he ran some tests and I added it to the post.
Furthermore, I agree, to an extent, that it makes the code slightly less readable, but no more than saving a measly 16 bytes. And personally, if you AREN'T a jQuery developer the syntax above is easier to write and easier to remember imo. And if you ARE a jQuery developer it saves time, especially in larger projects.
In the end it's a preference of syntax, so if given two options, I'll often choose the one that's easier to type. Personal preference I guess. Nonetheless, the comments are greatly appreciated and valid points have been raised.