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

Martin Brody
  • 233
  • 1
  • 6
  • 12
  • You can try [this](http://stackoverflow.com/questions/298750/how-do-i-select-text-nodes-with-jquery), the example with DOM methods should do the trick. – Didier Ghys Dec 01 '11 at 22:18

1 Answers1

4

This would get the &gt; -

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

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

Martin Brody
  • 233
  • 1
  • 6
  • 12
ipr101
  • 24,096
  • 8
  • 59
  • 61