Andrea Giammarchi
Member since Jul 29, 2011
- Profile: /members/8702-andrea-giammarchi.htm
- URL: http://webreflection.blogspot.com
- Comments: 9
Recent Blog Comments By Andrea Giammarchi
-
Using The LAB.js Script Loader With jQuery's DOM-Ready Event
Posted on Jul 29, 2011 at 10:38 AM
PS same behaviour if script is *after* the body, same concepts applies.... read more »
-
Using The LAB.js Script Loader With jQuery's DOM-Ready Event
Posted on Jul 29, 2011 at 10:34 AM
@Ben just check the source code of this file: http://www.3site.eu/ready.html most likely you gonna have true first, and false after. Why? Because a node in the dom, script included, does not guarantee that the DOM has been parsed already. This means you may have lots of surprises such: * not wor... read more »
-
Using The LAB.js Script Loader With jQuery's DOM-Ready Event
Posted on Jul 29, 2011 at 10:17 AM
Summary If you use LAB.js and jQuery is loaded and you wait after that, you can simply use jQuery(readyFn) if the purpose is to be sure that the DOM has been loaded. $LAB .script( "../../jquery-1.6.1.js" ) .wait() .script( "./friend.js" ) .script( "./pet.js&quo... read more »
-
Using The LAB.js Script Loader With jQuery's DOM-Ready Event
Posted on Jul 29, 2011 at 10:13 AM
My final wait() call is at the bottom of the DOM. This means that the wait() call will only be found once the DOM is "basically" loaded nope , and this is exactly the misleading/incorrect part ... anyway, your call.... read more »
-
Using The LAB.js Script Loader With jQuery's DOM-Ready Event
Posted on Jul 29, 2011 at 10:10 AM
no Ben, it's not about the style, it's about this article that mixes up LAB.js and jQuery ready event and what Kyle said already right after me and before your last reply. I am just saying: it's confusing, reduntant, superfluous, as it is presented right now. Either explain properly why you decide... read more »
-
Using The LAB.js Script Loader With jQuery's DOM-Ready Event
Posted on Jul 29, 2011 at 10:02 AM
Does LAB.js already have a DOM-ready event listener? YES , and it works perfectly with jQuery library already!... read more »
-
Using The LAB.js Script Loader With jQuery's DOM-Ready Event
Posted on Jul 29, 2011 at 10:01 AM
Ben, the jQuery ready events works just fine with LAB.js, this is my point. If you use jQuery.ready event no need to check if the content is there because unless it's not injected asynchronously by other scripts, and in this case these scripts should give you a way to know when things are done, you... read more »
-
Using The LAB.js Script Loader With jQuery's DOM-Ready Event
Posted on Jul 29, 2011 at 9:51 AM
Kyle agreed on cases where split the chain may be necessary, but being this post title "Using The LAB.js Script Loader With jQuery's DOM-Ready Event" I do believe there is a misunderstanding about LAB.js patch that works already with jQuery.ready() regardless the DOMContentLoaded has been ... read more »
-
Using The LAB.js Script Loader With jQuery's DOM-Ready Event
Posted on Jul 29, 2011 at 9:28 AM
Have you tried this instead regardless the script position? $LAB .script( "../../jquery-1.6.1.js" ) .wait() .script( "./friend.js" ) .script( "./pet.js" ) .wait() .script( "./cat-lover.js" ) .wait(function () { jQuery(function () { // your init ... read more »