$ è usato anche nella prototype

$("#mydiv")

Dovrebbe vedere cosa fanno le librerie js che include