Can JQuery and YUI live together w/o any conflicts?
Asked
Active
Viewed 6,981 times
4 Answers
10
Yes. They live in different namespaces, plus jQuery has a noConflict option.

Tom Ritter
- 99,986
- 30
- 138
- 174
-
1well YUI doesnt' use the $ since that is bad practise anyways (according to Douglas Crowford) – Oct 24 '08 at 21:05
6
Yes YUI3 uses YUI object, jQuery uses $. For instance you can use YUI 3 Test module and inside it using $ for DOM manipulation/traversing (I think jQuery is really good for those purposes), so for instance you can do:
YUI().use("test", function(){
test : function() {
$('div li').addClass("example");
Y.Assert.areEqual("example", $('div li').attr("class"));
}
});

sebarmeli
- 17,949
- 7
- 35
- 40