1

given the following setup:

<a href="foo">Subject</a> &gt; <a href=bar">Negotiation</a>, 

1) Is it possible to select the "&gt"; that is located to the right of this a tag with jquery? I do not want to select all "&gt"; on the page I am trying to find specific ones.

I tried .next() and .text() with jquery with no success.

I do not have access to the code as it is dynamically created from the backend which I have no access to so I need to do this with a document.ready

1
  • You can try this, the example with DOM methods should do the trick. Commented Dec 1, 2011 at 22:18

1 Answer 1

4

This would get the &gt; -

$("a[href='foo']").get(0).nextSibling.nodeValue 

Demo - http://jsfiddle.net/hugwm/

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.