The documentation states that you can use $ .noConflict () as follows:
jQuery.noConflict(); (function($) { $(function() {
It also states that calling it returns an instance of the jQuery object, so I could do this:
jQuery.noConflict()(function(){
However, is this combination valid?
(function($) { $(function() {
If so, is there any reason not to do it this way? And also (if this works), why not always use this method to ensure that inside our closure, $ == jQuery?
closures jquery
Jessebuesking
source share