YUI vs jQuery, for css style layouts

Complete beginner question. I've used jQuery a bit, I don't know YUI at all and know little about it. I am working on an IE specific website, now we are looking at it cross browser. jQuery seems great, hiding the differences between browsers from a javascript perspective. However, in terms of css layout, is this YUI I should really be looking at?

thanks

+2


a source to share


2 answers


I think you are concerned about both CSS and JavaScript compatibility, which means this is not a choice between YUI and jQuery - you can use both! Personally, I only use YUI for my 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 great playing field to start with. As far as JavaScript is concerned, I've found jQuery to be the simplest and most documented javascript library. As you say, it hides the differences across browsers, but it also has a whole bunch of power users willing to help you.

Hope this helps!

+1


a source


Both jQuery and YUI are very good for cross browser compatibility. However, the specific system you are using depends on what exactly you are trying to do. For example animation (show / hide) requires less code in jQuery than YUI. On the other hand, complex interfaces (heavy on CSS) would benefit from using YUI to dynamically manage styles.



Most of Yahoo's internal websites are built and styled with YUI. Go through the different examples on the YUI page to see how effective it is when used correctly: YUI version 3 .

+6


a source







All Articles