/ Published in: jQuery
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var seen = {}; $('div.related div a').each(function() { var txt = $(this).text(); if (seen[txt]) $(this).remove(); else seen[txt] = true; });
URL: http://stackoverflow.com/questions/2822962/jquery-remove-duplicate-elements