Независимое от библиотеки решение:
function Move(inputControl)
{
var left = document.getElementById("Left");
var right = document.getElementById("Right");
var from, to;
var bAll = false;
switch (inputControl.value)
{
case '<<':
bAll = true;
// Fall through
case '<':
from = right; to = left;
break;
case '>>':
bAll = true;
// Fall through
case '>':
from = left; to = right;
break;
default:
alert("Check your HTML!");
}
for (var i = from.length - 1; i >= 0; i--)
{
var o = from.options[i];
if (bAll || o.selected)
{
from.remove(i);
try
{
to.add(o, null); // Standard method, fails in IE (6&7 at least)
}
catch (e)
{
to.add(o); // IE only
}
}
}
}
HTML
<select id="Left" multiple="multiple" size="10">
<option>Some</option>
<option>List</option>
<option>Of</option>
<option>Items</option>
<option>To</option>
<option>Move</option>
<option>Around</option>
</select>
<div id="Toolbar">
<input type="button" value=">" onclick="Move(this)"/>
<input type="button" value=">>" onclick="Move(this)"/>
<input type="button" value="<<" onclick="Move(this)"/>
<input type="button" value="<" onclick="Move(this)"/>
</div>
<select id="Right" multiple="multiple" size="10">
</select>
CSS (пример)
select { width: 200px; float: left; }
#Toolbar { width: 50px; float: left; text-align: center; padding-top: 30px; }
#Toolbar input { width: 40px; }
Быстрое тестирование только для FF3 и IE6 & 7.