You could use a simple List, which is a select tag with the size-attribute set to 2 or more and the multiple-attribute set.
<select name="myListOfCategories" size="10" multiple="multiple">
<option value="foo">bar</option>
</select>
That way you can incorporate it in a simple form and it looks and behaves like a list.
If you want more control over you list (like behavior), you have to create your own list handler in jQuery. For this, i would suggest working with classes.
jQuery('ul#Categories li').click(function(){
if (jQuery(this).hasClass('selected')) {
jQuery(this).removeClass('selected');
} else {
jQuery(this).addClass('selected');
}
})
jQuery('form').submit(function(){
//Unfortunately, I don't know a proper way to do this so... DIY! Any Help SO?
var foobar = '';
jQuery('ul#Categories li.selected').each(function(){
foobar += jQuery(this).text() + '^'; //where '^' is a delimiter
})
jQuery('#someHiddenTextfield').val(foobar);
})
For CSS, i'd suggest
ul#Categories li.selected {
background-color: blue;
color: white;
}