What is "$" in Chrome console? -


when type $ in chrome console returns function. sure it's not jquery's $.
if want use jquery in console, best way trigger jquery in chrome console $.

$ alias document.queryselector. in same vein there $$ alias document.queryselectorall.

it defined in command line (console) api.

command line api reference

the command line api contains collection of convenience functions performing common tasks: selecting , inspecting dom elements, displaying data in readable format, stopping , starting profiler, , monitoring dom events.

if have $ defined on page global (perhaps using jquery), you'll global, not command-line built-in.

there other handy functions defined there.


to run jquery, without having in page source code, may find chrome extensions handy, or copy-paste jquery source code in console.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -