[jQuery] Re: Howto detect DOM element from selected text

2009-07-01 Thread Massimo Lombardo
On Tue, Jun 30, 2009 at 12:31, Alexander wrote: > I am trying to detect the DOM element on a unkown web page  from the > current selected text on that page. > > Which means: I select text on a web page and then I would like to get > the dom element to which this text belongs. This is not a jQuery

[jQuery] Re: Howto detect DOM element from selected text

2009-06-30 Thread Alexander
Hi and thanks for your answer ! I'm trying to work with the node that contains the text e.g. "John". But it could be any web page on which I want to select some text and get the corresponding dom element (node). My basic approach was to traverse through ALL dom nodes and look if any of them cont

[jQuery] Re: Howto detect DOM element from selected text

2009-06-30 Thread Charlie
not sure you've explained what it is you are trying to do are you trying to work with "John" and create a selector/method to do it? Alexander wrote: Hi there ! I'm stuck with a problem and hope someone can give me the right hint. I am trying to detect the DOM element on a unkown web pag