KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Running into a spot of trouble and basically trying to create a variable which can be used as a selector. eg $('a').click(function(){ var selector = $(this).dompath(); }); HTML: html body div div /div /div ul li li /ul div ul li li li hello world /ul /div body html this would then return something like path = html body div ul li:contains('hello world') then i could use this in a selector to select this div so if i did like $(path).text() would return "hello world" many thanks!
Tags (comma-separated)
Save Edits
Cancel