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!
element is added that contains `- hello world war ii
`, your path may select the wrong element. So you have to specify what kinds of differences your selector should be sensitive to.
– LarsH Sep 28 '12 at 19:52