jquery: how to find an element which is comming 2 elements before current element
<p>i have a markup which look like this:</p>

<pre><code>&lt;h3&gt;Paragraf3-dummytext&lt;/h3&gt;
&lt;p&gt;
&lt;a name="paragraf3"&gt;
Quisque id odio. Praesent venenatis metus at tortor pulvinar varius. Lorem ipsum dolor sit 
&lt;/a&gt;
&lt;/p&gt;
</code></pre>

<p>what i want to do is to find all 'a' tags with 'name' attribute and find the 'h3' tag for that anchor; im trying to do it like this:</p>

<pre><code>var paragraf = [];
var paragrafheading = [];
$('a[name]').each(function() {
paragraf.push($(this).attr('name'));
paragrafheading.push($(this).prev().text());
</code></pre>

<p>but it does not work becouse there is a 'p' tag around the text. Any suggestions would be appreciated. Thanks</p>
