V
V
Vadim Remin2015-06-16 15:16:20
JavaScript
Vadim Remin, 2015-06-16 15:16:20

Is there an add-on for Chrome or Mozilla that shows the DOM address of an element?

This means such an address at which it can be unambiguously found through JQuery (), for example. Something like: "body div.myclass p a"

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexey Ukolov, 2015-06-16
@dkudrin1

In Chrome, in the Elements panel, right-click -> Copy CSS Path .

D
Dmitry Shinkar, 2015-06-16
@DeadCowsDontMoo

You can write f-yu in JS and drive the necessary "patient" into it and get what you need. Found somewhere like this 100%, try Google.

S
Stalker_RED, 2015-06-16
@Stalker_RED

Do you need a specific element or all elements of this class?
For a particular element, you can use FirePath, which gives an xpath.
And xpath can be driven into jQuery XPath plugin or document.evaluate() (All browsers except IE).
For the element class, the same plugin produces a css selector.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question