tags:

views:

569

answers:

2

Hi 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

+2  A: 

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.

EAMann
"Intricate interfaces (heavy on the CSS)"Yep, definately that. zero animation at the mo.thanks for the reply
tony
YUI has a lot of built-in features and plug-ins to control color, position, overlays, and visibility. Even Google uses YUI to build their apps and interfaces. jQuery is more for simple scripting than for building an interface (hence the names "query" and "user interface").
EAMann
A: 

Hey Tony,

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!

Stuart Memo
thanks for the reply
tony