jQuery get text node siblings at deepest level
问题 I have div s that may consist of text like this: <div> <p> <span>My text <br /> Some more text</span> </p> </div> Or like this <div> <p> Here's a chunk of text </p> </div> Or any other combination, but the final level will have text that may or may not be separated by <br /> . (Is a span that contains a br a single node? Or is it two siblings at the same level?) In the first case, the text from the deepest children I want is: My text Some more text In the second: Here's a chunk of text My