Last Updated: February 25, 2016
·
4.457K
· stevennunez

Chrome - Show currently selected element

There's no need to run a crazy jQuery selector to pull up an element in the Chrome console.

  1. Right click and inspect the element.
  2. Open the console tab. The selected element will be accessible as $0.

Chrome will remember the last 5 selected elements. They are accessible by using $0, $1, $2, $3, $4.

5 Responses
Add your response

Whoa

over 1 year ago ·

So simple, yet so powerful

over 1 year ago ·

cmd + shift + c for those who don't like right-clicking

over 1 year ago ·

Also works in firebug for Firefox :)

over 1 year ago ·

Greate tip!

over 1 year ago ·

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Did you know?

The website is part of the attack surface, not only the API behind it. Every script, iframe, and tag on a public page is code that did not go through the same review as the backend.

Security insights from Cside