Heu, jquery a beau faire 52Ko, pourquoi l'inclure en double ?
On ne peut pas détecter s'il n'est pas déjà installé ?
Si je prend l'exemple de jspax (www.jspax.org) on peut charger jQuery
et les css à la demande
$using(['jQuery.ajax','jQuery.event'],function() {
$('.fillme').click(function() { $(this).load('test.html'); });
});
cf. http://www.nabble.com/Re%3A-dynamic-loading-of-jquery.js-into-my-web-page-p8169238.html
et http://www.nabble.com/Re%3A-dynamic-loading-of-jquery.js-into-my-web-page-p8167439.html
(problèmes sous Safari, je crois)
De plus, ce serait pas mal d'utiliser la version compressée de jquery
(19Ko) plutôt que la version non compressée (50Ko), non ?
.Gilles
2007/1/9, fil@rezo.net <fil@rezo.net>:
Author: fil@rezo.net
Date: Tue Jan 9 01:05:43 2007
New Revision: 8708Log:
crayons.js embarque sa propre copie de jquery.js et de form.js, avec jQuery renomme en cQuery, et le dollar ignoreAdded:
_plugins_/_stable_/crayons/javascript/form.js
- copied unchanged from r8707, _plugins_/_dev_/-jQuery/form.js
_plugins_/_stable_/crayons/javascript/jquery-1.0.4.js
- copied unchanged from r8707, _plugins_/_dev_/-jQuery/jquery-1.0.4.js
Modified:
_plugins_/_stable_/crayons/crayons.js.htmlModified: _plugins_/_stable_/crayons/crayons.js.html
--- _plugins_/_stable_/crayons/crayons.js.html (original)
+++ _plugins_/_stable_/crayons/crayons.js.html Tue Jan 9 01:05:43 2007
@@ -6,18 +6,9 @@
#CACHE{7*24*3600,cache-client}
#HTTP_HEADER{'Content-Type: text/javascript'}-[(#CHEMIN{javascript/crayons.js}|spip_file_get_contents)]
+[(#CHEMIN{javascript/jquery-1.0.4.js}|spip_file_get_contents|replace{jQuery,cQuery}|replace{'var \$ = cQuery','// dont set dollar'})]
+[(#CHEMIN{javascript/form.js}|spip_file_get_contents|replace{jQuery,cQuery})]
+[(#CHEMIN{javascript/crayons.js}|spip_file_get_contents|replace{jQuery,cQuery})]
[(#CONFIG{crayons}|match{s:11:"yellow_fade";s:2:"on";}|?{'',' '})
-[(#CHEMIN{javascript/crayons-fade.js}|spip_file_get_contents)]
+[(#CHEMIN{javascript/crayons-fade.js}|spip_file_get_contents|replace{jQuery,cQuery})]
]
-
-/*
-[(#REM|sinon{', '}|implode{#CONFIG{crayons}|unserialize|array_keys})]
-config:
-[(#CONFIG{crayons}|match{s:11:"msgNoChange";s:2:"on";})]
-[(#CONFIG{crayons}|match{s:11:"yellow_fade";s:2:"on";})]
-je prefere avec cfg:
-msgNoChange: [(#CONFIG{crayons/msgNoChange,no})]
-yellow_fade: [(#CONFIG{crayons/yellow_fade,no})]
-voila
-*/_______________________________________________
Spip-zone-commit@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-zone-commit