javascript - Concept - Firing events on a resource load -


is there library this?

is there pure code way it?

i have code want run when library has loaded.

jquery.js -> jqueryui.js. 

once jqueryui loaded have app specific code want execute. want use event system know when happens.

is common practice?

if load libraries "vanilla" way:

<script src="path/to/jquery.js"></script> <script src="path/to/jqueryui.js"></script> 

then script tags placed after executed after preceding scripts have been loaded , parsed.

you can instead fancier async loaders such requirejs or headjs, provide "onload"-like callbacks in can execute own code.


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -