| Page 1 of 2 | [ 15 posts ] | Go to page 1, 2 Next |
|
Hi all,
I am using only yui-min.js. However I found (@net panel of firebug) that request for loader-min.js and combo request for the below mentioned are made. 3.3.0/build/oop/oop-min.js 3.3.0/build/event-custom/event-custom-base-min.js 3.3.0/build/event/event-base-min.js 3.3.0/build/pluginhost/pluginhost-min.js 3.3.0/build/dom/dom-min.js 3.3.0/build/node/node-min.js 3.3.0/build/event/event-delegate-min.js There is a bit of latency while getting the response of the above mentioned. Is there any way to avoid this other than including the complete set of YUI 3.3.0 in my application. Thanks, Sarbbottam |
|
My script is as below:
<script language="javascript" src="js/common.js"></script> <script> YUI().use('node', function (Y) { Y.one('#AWMEL0').setStyle('width', '981px'); var show = function() { Y.all('#AWMEL0 tr td table').setStyle('width', '163px'); Y.all('#AWMEL0 tr td img').setStyle('width', '163px'); var tableLeftOffset = 0; var tableCounter = 0; Y.all('#AWMEL0 tr td table').each(function(v){ v.setStyle('left', tableLeftOffset+'px'); v.setStyle('position', 'absolute'); tableCounter += 1; tableLeftOffset = (Math.floor(tableCounter / 3)) * 163; Y.log(tableLeftOffset); }); var imgageleftOffset = 0; Y.all('#AWMEL0 tr td img').each(function(v){ v.setStyle('left', imgageleftOffset+'px'); v.setStyle('position', 'absolute'); imgageleftOffset += 163; }); Y.one('#AWMEL0').setStyle('width', '981px'); } Y.on('domready', show); Y.on('resize', show, '#AWMEL0'); Y.on('mouseover', function(e){ Y.all('.AWMST5').setStyle('top', '125px'); }, '#AWMEL0'); }); </script> Note: I have included the content of yui-min.js to my common.js file Any suggestion? |
|
Hello Sarbbottam Bandyopadhyay,
If you are looking to have one script tag that will load all of those YUI 3 modules in one go I recommend using the "dependency configurator" to generate a <script> tag that will load only the modules you want to use. http://developer.yahoo.com/yui/3/configurator/ |
Juan Ignacio DopazoYUI Contributor
|
There's a video by Ryan called Achieving Performance Zen with YUI 3 in YUI Theater that talks about different loading strategies. You might want to check it out.
|
|
Thanks Floydian and Juan.
I will take a look at both of them, My intention is to load all the dependency from application it self not from yahoocdn. I do not want the loader or combo to fetch the dependency module from yahooapis.com Not sure if it makes any sense. |
|
Are you looking to have the YUI loader load files from your server, or are you looking to bypass YUI loader entirely and just load files from your server manually?
PHP Horizons | PHP Horizons Blog | Gran Turismo 5 Power
|
|
I would like to bypass the loader.
|
|
Then I would recommend combining the YUI scripts that you need into one javascript file and then manually include it using a <script> tag. The YUI instance should pick up on the YUI modules already being loaded, thus bypassing the loader.
Hope that helps. |
|
Thanks, YUI Configurator shows <script type="text/javascript" src="http://yui.yahooapis.com/combo?3.3.0/build/yui/yui-min.js&3.3.0/build/oop/oop-min.js&3.3.0/build/dom/dom-base-min.js&3.3.0/build/dom/selector-native-min.js&3.3.0/build/dom/selector-css2-min.js&3.3.0/build/event-custom/event-custom-base-min.js&3.3.0/build/event/event-base-min.js&3.3.0/build/pluginhost/pluginhost-min.js&3.3.0/build/dom/dom-style-min.js&3.3.0/build/dom/dom-style-ie-min.js&3.3.0/build/dom/dom-screen-min.js&3.3.0/build/node/node-min.js&3.3.0/build/event/event-base-ie-min.js&3.3.0/build/event/event-delegate-min.js"></script>, is there any way I can download the composite js file from yahoo???
|
|
Absolutely, just paste that url into your browser, and from the file menu click "save page as" or something to that effect. Or just copy the text off the page.
Cheers -> http://yui.yahooapis.com/combo?3.3.0/bu ... ate-min.js |
| Page 1 of 2 | [ 15 posts ] | Go to page 1, 2 Next |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 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
Powered by phpBB® Forum Software © phpBB Group