I have a function that is called when I click on an item. And inside this function I can refer to it. But how to find out the whole "path" or I don’t know how to say exactly to the element, so that I can refer to it from other functions?

  • Add an id attribute to your element, for example <div id="div-123"> and ... var element = document.getElementById("div-123") - Sergey

1 answer 1

What for? Pass this element as an argument to other functions.