Dear exhibit developers,

When you load Exhibit, it wipes any previous jQuery namespace (and
plugins) on the page. This prevents Exhibit from being dynamically
loaded.

Unfortunately the jQuery (version 1.2.1 in Simile) contains a bug that
stops noConflict from working.
Can you upgrade to jQuery 1.2.3?

Here's an example patch showing how Exhibit can avoid polluting the
jQuery namespace.
Any chance of something like this being implemented?

regards,
--Will



A      src/ajax/api/scripts/jquery-1.2.3.js
D      src/ajax/api/scripts/jquery-1.2.1.js


Index: src/webapp/api/scripts/create.js
===================================================================
--- src/webapp/api/scripts/create.js    (revision 9119)
+++ src/webapp/api/scripts/create.js    (working copy)
@@ -8,7 +8,7 @@
  *  autoCreate=false when you include exhibit-api.js.
  *======================================================================
  */
-$(document).ready(function() {
+SimileAjax.jQuery(document).ready(function() {
     var fDone = function() {
         window.exhibit = Exhibit.create();
         window.exhibit.configureFromDOM();
Index: build.xml
===================================================================
--- build.xml   (revision 9119)
+++ build.xml   (working copy)
@@ -20,11 +20,13 @@
     <!-- SimileAjax -->
     <jsmin output="src/ajax/api/simile-ajax-bundle.js">
         <fileset dir="src/ajax/api/scripts">
-            <include name="platform.js" />
+            <include name="jquery*.js" />
+                       <include name="platform.js" />
         </fileset>
         <fileset dir="src/ajax/api/scripts">
             <include name="**/*.js" />
             <exclude name="signal.js" />
+            <exclude name="jquery*.js" />
             <exclude name="platform.js" />
         </fileset>
     </jsmin>
Index: src/ajax/api/simile-ajax-api.js
===================================================================
--- src/ajax/api/simile-ajax-api.js     (revision 9119)
+++ src/ajax/api/simile-ajax-api.js     (working copy)
@@ -166,7 +166,7 @@

     (function() {
         var javascriptFiles = [
-            "jquery-1.2.1.js",
+            "jquery-1.2.3.js",
             "platform.js",
             "debug.js",
             "xmlhttp.js",
Index: src/ajax/api/scripts/platform.js
===================================================================
--- src/ajax/api/scripts/platform.js    (revision 9119)
+++ src/ajax/api/scripts/platform.js    (working copy)
@@ -2,6 +2,7 @@
  *  Platform Utility Functions and Constants
  *==================================================
  */
+SimileAjax.jQuery = jQuery.noConflict(true); // this must be called
after our jQuery has been loaded but before control returns to
user-code.

 SimileAjax.Platform.os = {
     isMac:   false,
_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general

Reply via email to