Skip to content

Instantly share code, notes, and snippets.

View zspitz's full-sized avatar

Zev Spitz zspitz

  • Modiin Illit, Israel
View GitHub Profile
@paulirish
paulirish / gist:6732048
Created September 27, 2013 17:30
Con$ole Bling

Con$ole Bling

Before I get into this, I should point out that if you have jQuery on your page, when you type $ in your console it's indeed jQuery, otherwise, it's defined by your developer tools.

History

A bit ago, someone on SO asked where does $$() come from? Alex Russell called this "the bling-bling function", and it's part of the Command Line API and will return an array of elements to match a CSS selector. Why the double $$? Well, the single $ was already taken: the pioneer of developer tools, Firebug, assigned the $() to getElementById and so it has remained.

But.. let's be real though, ID's? Who is using ID's anymore? Using $ and $$ I often tho