text to unique characters

text to unique characters

by hippietrail

HTML

<textarea id="in">hilltop hoods</textarea>
<button id="go">Go</button>
<pre id="out"></pre>

JavaScript

$('#go').click(function () {
    var txt = $('#in').val();
    txt = $.unique( txt.split('') ).sort().join('\r\n');
    $('#out').text(txt);
});