Foren / Cotonti / Core Labs / Archive / Load Chili files on demand

Orkan
#1084 17. September 2008, 04:24
Well, a function called register() is the key here, eg:
$.plugin.register("jquery.chili", {fn: "chili"});
when you call $.chili() somewhere on the page, it will load jquery.chili.js file first and then proceed with chili() as usual. Very smart :)

Additionally, you can use two callbacks, onBefore and onAfter, for example to load additional files like style sheets, etc...

see chili.header.php in my rar for more info...
Perl - the only language that looks the same before and after RSA encryption.