tony
tony

Reputation: 2392

YUI vs jQuery, for css style layouts

Complete novice question. I've used jQuery a bit, YUI not at all and know very little about it. I work on a website thats IE specific, we're now looking at making it cross browser. jQuery seems great at hiding the differences between browsers from a javascript point of view. However in terms of css layout is it YUI that I should really be looking at?

thanks

Upvotes: 2

Views: 2638

Answers (2)

Stuart Memo
Stuart Memo

Reputation: 1178

Seems to me you're concerned about both CSS and JavaScript compatibility, which means it isn't a choice between YUI and jQuery - you can use both! Personally, I use YUI only for its CSS reset...

http://developer.yahoo.com/yui/3/cssreset/

This allows you to remove any default styling (paddings, margins, etc) that are built into browsers by default. This will give you a nice level playing field to start off with. As for JavaScript, I find that jQuery is simplest and most documented javascript library out there. Like you say, it hides the differences in various browsers, but it also comes with a whole heap of experienced users willing to help you out.

Hope this helps!

Upvotes: 1

EAMann
EAMann

Reputation: 4146

Both jQuery and YUI are very good at cross-browser compatibility. The particular system you use, though, depends on what exactly you're trying to do. Animations (show/hide), for example, require less code in jQuery than YUI. Intricate interfaces (heavy on the CSS), on the other hand, would benefit from using YUI to dynamically control styling.

Most of Yahoo's internal websites are built and styled with YUI. Take a walk through the different examples on the YUI page to see just how powerful it can be when used correctly: YUI version 3.

Upvotes: 6

Related Questions