Utilisateur:Lgd/Test quater
$('span.foo a').each(function(){ var url = $(this).parent().parent().prevAll(':header:first').find('span.editsection a').attr('href'); if(url) { $(this).attr('href', url); } });
Lorem
Section 1 bar
Ipsum
modifierSection 2 bar
Sic
modifierSection 3 bar
Dolor
modifierSection 4 bar
Amet
modifierSection 5 bar