4 ms·
Looks like a very handy bunch of code, but I can't say I like the "_" part of it. One of the neatest things about jQuery is the way all of the jQuery functiona
by simonw 17y ago
Looks like a very handy bunch of code, but I can't say I like the "_" part of it.
One of the neatest things about jQuery is the way all of the jQuery functionality lives in the "jQuery" namespace, with $ just set up as a convenient shortcut. If you don't want the $ in your global namespace (but still want it in your own code) you can do this:
jQuery.noConflict();
jQuery(function($) {
// Code that uses the $ shortcut
}
Feature request for underscore: something similar. If I'm already using the _ for something I'd like to still be able to use the underscore library, but bound to a different symbol.
Underscore.noConflict();
Underscore(function(_) {
// My code that uses _
}