$ and $$ will work on any web page (if jQuery is also not enabled) in Chrome, FF and Safari, where $ returns the first selector element, here $ is document.querySelector , and $$ returns an array of elements such as document.querySelectorAll . They are built-in functions of Chrome and Firefox browsers, you can see the definition of $ and $$ in safari.
Open Wordpress in any of chrome, firefox or safari and open the developer console to check these results ... (why Wordpress because they wonβt use jQuery or Moo tools)
$('div') returns first div in DOM $$('div') returns all div in DOM
You can check it here.
Ranganadh paramkusam
source share