by selectnull · 15y ago · 0 comments
Is it something that the console is doing or is it some sort of feature of jQuery?
I believe in both tools, at a breakpoint, $ will be the getElementById shortcut that's baked into the console API. Kind of a bummer, we're trying to work around this.
You can always do `$ = jQuery;` to redefine it and you'll be good.
(it was actually fixed two weeks back. phew!)
I'm not exactly sure what defines it, I think it's devtools (or firebug) itself, but it's a function that returns a dom element with id of first argument.
Very annoying, although truth be told, $ and _ should have never been used in js libraries: those names were reserved for internal use in javascript.
"This standard specifies one departure from the grammar given in the Unicode standard: The dollar sign ($) and the underscore (_) are permitted anywhere in an identifier. The dollar sign is intended for use only in mechanically generated code."
It was removed (or I can't find it) in 5th edition. Also, I can't find a reference for underscore.