Lauren Smith![]()
YQuery is a module that makes loading jQuery, and jQuery plugins dead simple. It uses the use() syntax that you're familiar with for loading YUI3 modules and offers loads of features.
Features:
The most typical implementation of YQuery is to pass in an array of script paths to for YQuery to load. Check out the Examples page for more options to use.
<script src="http://yui.yahooapis.com/3.1.1/build/yui/yui-min.js"></script>YUI({
//Last Gallery Build of this module
gallery: 'gallery-2010.03.30-17-26'
}).use('gallery-yquery', function(Y) {
var jQueryPlugins = ['swift.js', 'gps.jquery.js']; // YQuery accepts both an array of plugins or just a single string
Y.YQuery().use( jQueryPlugins, function(e) {
// jQuery loaded do $() functions here now
});
// or just load jQuery
Y.YQuery().use( function(e) {
// jQuery loaded do $() functions here now
});
// or override the latest jQuery version and use an older version
var jq = Y.YQuery();
jq.version = '1.3.2';
jq.use( function() {
alert( 'jquery ' + $.fn.jquery + ' loaded' ); // Will show that 1.3.2 loaded successfully
});
// More options available just check out the examples link
});| Subject | Author | Date |
|---|---|---|
| So freaking awesome | Andrew Wooldridge | 03/29/10 |
| Re: So freaking awesome | Lauren Smith | 03/29/10 |
| YUI 3.5.0 | Roman Stachura | 04/15/12 |
© 2006-2011 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info