JQuery Plugins

imMultiLineList 0.5 - Get Selected Items

The following example demonstrates how to retrieve selected items from the imMultiLineList. Use the getSelectedItems method to retrieve the items. The method will return a multi-dimensional array that contains two members: value and text.

$(document).ready( function() {
	var addressList = $("#listCntnr").imMultiLineList({
		option_map: {"optionValue": "id", "optionText": "address"},
		item_class: "multiListItem",
		item_hover_class: "multiListItemHover",
		item_select_class: 'multiListItemSelect'
	$('#theButton').click(function() {
		var addresses = addressList.getSelectedItems();
		$.each(addresses, function(i,itm) {
			$('#selectedCntnr').append(itm.value + '
' + itm.text + '
'); }); }); });

View the source for this page to see how to setup the plugin. For documentation about the imMultiLineList plugin, view the blog post.


, , ,