I am generating a comma-separated list out of the rel-attributes of several li-elements, using the map-function.
poiSelectedList = $('#poiList li li.selected').map(function() { return $(this).attr('rel'); }).get().join(',');
How can I assure that there are no duplicates inside my list?
You could make a cache like this:
Or, as patrick dw suggested, a more concise version: