I tested $.noConflict() in http://novius-os.jp/

It seems to me that $.noConflict() works.
By Fumito MIZUNO , 20 February 2014
.
By Gilles FELIX , 20 February 2014

$.noConflict() remove the use of the latest jQuery librairie with de $ variable and restore the old value of $.
$.noConflict(true) do the same but with de jQuery variable. $.noConflict(true) return jQuery instance but not affect it to $ or jQuery.

A page's scenario:

  1. the page loads a first instance of jQuery version 1.4
  2. the page loads the slideshow. It loads a second version of jQuery in version 1.7.2
  3. the page loads a plugin or a script that waits for jQuery in the 1.4 version

If, in the javascript for initialize the slideshow, we use $.noConflict(), then the plugin in step 3 receives a jQuery 1.7.2 version, that may cause issues.

But in many cases, you can replace $.noConflict(true) by just $, or jQuery, or $.noConflict() and your page still works

And if you want to re-use the slideshow's jQuery instance after the slideshow's intialization, I agree that $.noConflict(true) is a issue. But in your case, I suggest to add a slideshow format (extend slideshow.config.php) and do the same that the flexslider format.

Thanks, Gilles,

I extended slideshow.config.php.
I set 'jquery' => 'static/apps/foundation/js/vendor/jquery.js', so that I can share the jQuery the foundation theme provides.

And I also extend views/flexslider/javascript.php, where I use $.noConflict().

It works.
By Fumito MIZUNO , 22 February 2014
Hi Fumito,

Well done !
By Gilles FELIX , 22 February 2014
To
    ou Annuler
Slideshow App and $.noConflict(true)
By Fumito MIZUNO , 20 February 2014
To

Slideshow App uses jQuery in non-conflict mode.

(function($) {   $(window).load(function() {   $('.flexslider').flexslider({"animation":"fade","slideshow":true}).novius_flexpreview();   });  

})($.noConflict(true));

 

$.noConflict(true) disables all the other jQuery, but is it necessary?

$.noConflict() is not OK in that situation?

 

I am considering to use Slideshow App with Foundation (theme framework using jQuery). See here for a sample page: http://novius-os.jp/