Second element in each loop returns undefined
<p>From fields with the class <code>.edit-links</code> i´m able to retrieve the values but <code>$(this).next(".edit-url").val();</code> only returns the first found element then only returns undefined. In the console i can see that "this" is targeting the first element as expected but the second .edit-url is not found and returning prevObject.</p><div class="snippet" data-lang="js" data-hide="false"><div class="snippet-code"><pre class="snippet-code-js lang-js prettyprint-override"><br /><code>$('#edit').click(function() {<br /> edit.revertLink();<br />});<br /><br />var edit = {};<br />edit.revertLink = function() {<br /><br /> $('.edit-link').each(function(index) {<br /><br /> var currentName = $(this).val();<br /> var url = $(this).attr('data-tempurl');<b...