May 23rd, 2017 by inflectra
Modern browsers have incredibly powerful developer tools. Hit the F12 key and you get access to a wealth of great information and features. The dev tools are great for looking through the DOM and inspecting specific HTML elements. Want to do something on/with that element in JavaScript too? They have you covered. The secret is $0.
<joke>In fact, using $0 can save you more than $0 :-)</joke>
Select an element in the "Elements" panel of the browser dev tools, or "Inspect Element" from the web page itself. This will select the item. The dev tools puts this helpful "== $0" next to the HTML element for you.
What is that for? Accessing that exact element in the console through JavaScript. Type "$0" in the console and press return. You get the element you just selected. Pretty neat huh?
Ask an Inflectra expert:
And if you have any questions, please email or call us at +1 (202) 558-6885
To ensure your satisfaction, we provide product support free with every subscription purchase, which guarantees you unlimited access to our knowledge base, customer forums and helpdesk. Review our support policy.
The Inflectra knowledge base includes a wide variety of helpful support articles written by Inflectra's customer support specialists.
Discover great tips, discussions, and technical solutions from fellow customers and Inflectra's technical experts.
If you can't find the answer you're looking for, please get in touch with us: over email, phone, or online.