Not to start a holy war or anything, but I think the choice would be between YUI or Dojo and not JQuery to YUI, if you where trying to make a comparison. They kind of compete in different spaces. to me YUI and Dojo try to provide a full stack in the browser for (and I hate to use the word) enterprise scale applications. They are trying to build an application development framework for the browser. Where as the others are trying to make you job of developing web pages easier. Here is my personal opinion on the matter and it is solely based on my preference. YUI and Dojo provide all of the capabilities that the other frameworks provide and in may ways a lot more, but at added complexity. You have to do custom builds to remove out the feature you are not using so that it is a small package. Further they have a verry consistent API so once you understand their constructs it is easy to discover and implement new functionality.Needles to say, if you are implementing a stock trading web app YUI or Dojo should be given serious consideration. The kicker is that they have a steeper learning curve than JQuery, which is a tool that you can pick up and use the first day. That being said I prefer Dojo over all of the frameworks that I have used, because I do that kind of development.
Dojo's grid is a very nice grid as well. AsyncQueue is a nice api for command chaining. Dojo has dojo.connect which can be used to accomplish the same pattern with a little work but it is not out of the box. I am not sure if dojo has an equivalent to AsyncQueue.
But back to the point of the original question there is no reason that you cannot use JQuery for task x and y and YUI for task z many of the frameworks play nice together so it may not be a matter of learning one over the other but rather using the pieces of the bigger frameworks with your existing framework.
Where do you think it stands right now? Is it like more in the JQuery/Prototype league or the Sproutcore/GWT/Cappuccino/Pyjamas league?
I haven't used YUI much. Just tabs and other basic stuff around a year back. So would like to know if it's becoming more like the other desktopUI-like pkgs.
http://www.yuiblog.com/blog/2009/09/29/yui-3-0-0/