Hi Robert,
You suggestion is the same as our adjustments to the JSmol JavaScript code, except for the, still, global registration of the JQuery object. The major change is in the call to ‘var JSmoljQuery = $.noConflict(true);’ This function call prevents the global registration by releasing the $ identifier and instead enable the use of own JQuery object through the JSmoljQuery object. When I tried you suggestion the jQuery conflict still remained. Kind Regards, Eelco Van: Robert Hanson [mailto:hans...@stolaf.edu] Verzonden: donderdag 24 september 2015 14:56 Aan: Eelco van Dam <eelco.van....@peacs.nl> CC: jmol-users@lists.sourceforge.net Onderwerp: Re: Re: [Jmol-users] Prolem with JQuery in JSmol and Drupal Could you please try this JSmol.min.js? It is much simpler. Just a few lines, all in the jQuery part. (function() { // bh added wrapper var jQuery = (function( global, factory ) { // bh added var jQuery return factory( global ); // bh added missing "return" if (!window.jQuery) // bh do not allow overwriting of window.jQuery })(); // bh added wrapper 1) wrapped entire package with (function() { ... ... })(); 2) create a truly local variable jQuery to this wrapped function 3) only create window.jQuery if it does not already exist. Note that you will need to use Jmol 14.2 or 14.3 for this if you use this exact file. Or you could replicate those few changes in yours and see how that works with 14.0. I think this is better than removing the old jQuery and replacing it with a new one. Yes? Bob
------------------------------------------------------------------------------
_______________________________________________ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users