SyntaxFix
Write A Post
Hire A Developer
Questions
This can get you selector path of clicked HTML element-
$("*").on("click", function() { let selectorPath = $(this).parents().map(function () {return this.tagName;}).get().reverse().join("->"); alert(selectorPath); return false; });