Option List jQuery plugin

A plugin for display list of item to insert.
List item are stored in input hidden comma separed, the call is simple
Some bug to fix

options are

  • target: target div to update with options
  • input: input to update with values
  • items: items list as key:value
  • optional: default to $("<input>").attr("type","text") ... you can setup autocomplete
  • preset: an array of key preset (must be in items)
$("#morelink").optionlist({
	  target:'#optionlist',
	      input: '#iptvalues',
	      items: {'0':'prova','1':'test','2':'due','3':'tre'},
	      preset: [0]
	  });
moreitem
.optionlist_itemlist {
position:absolute;
display:none;
border:1px solid #000;
padding:2px;
background:#fff;
z-index:3001;
}
.optionlist_additem{
 cursor:pointer;
  color:blue;
 }
.optionlist_additem:hover{
  text-decoration:underline;
 }
.optionlist_item{
 width:100px;
  float:left;
 }
.optionlist_rmitm{
 position:absolute;
  background: #999;
 opacity:0.7;
 display:none;
 cursor:pointer;
}

also #optionlist_overlay is the overlay at z-index:3000

Attachments: 
AttachmentSize
Plain text icon jquery.optionlist.js.txt7.96 KB