javascriptjqueryname-collision

javascript function name collision


I have two JavaScript files that contain a jQuery function with the same name $().

How can I distinguish between the two identically named functions?


Solution

  • Rename one.

    $ = typeof $ !== 'function' ? $ : $foo;