Possible Duplicate:
jQuery selecter whats difference between jQuery(“element”) and $(“element”)?
Just a little curious..
Why sometime I see it written as $("#SomeElementId") and sometime as jQuery("#SomeElementId") ? What is the exact difference ?
$is an alias of thejQuerynamespace. It’s just quicker to type. It is avoided normally when there is the potential for conflict with other libraries that also utilise$.jQuery always declares
jQuerybut will only declare$unlessjQuery.noConflict()is called.Either way, a common pattern is to reference
$as a local variable in a closure, via an immediately-executed function: