how to get previous element with jquery each()
<p>I know the each function iterates over an array. Is there way to access the indice like (this[i])? I need to be able compare current element's pubDate with the previous element's pubDate and if it's different output a new pubdate.</p>

<pre><code>    $(data).find('item').each(function(i, value){
            var title = $(this).find('title').text().replace(/\w+\s+\(.*?\)/, "");
            var link = $(this).find('link').text();
            var pubDate = $(this).find('pubDate').text();
            alert(title); 
            alert(link);
            alert(pubDate);
            $('#events').append("&lt;p&gt;" + title + "&lt;br/&gt;" + link + "&lt;/p&gt;");

        });
</code></pre>
