Umm
Be very, very careful with that last modification, because if you
select options in one or more of your addFrom selects without actually
adding them to the target select, then select and remove something
from the target select, you will probably find that the selected
options in the addFr
Thanks alot! That did the trick for me. =)
Surprisingly I had to remove tgt from the last selector in order for
it to work properly though. Which confuses me. But hey it works fine.
Thanks!
(So this
$('option:selected', tgt).remove();
became
$('option:selected').remove();
)
On 25 okt, 11
An alternative ...
var tgt = $('select:not(.addFrom)');
$('#right').click(function(){
var x = $(tgt).children();
$('.addFrom option:selected').filter(function(){
// remove, by value, selected options already in target...
return (x.filter('[value="'+this.value+'
And what would I do in this case? Having multiple selectboxes to
choose items from?
I'm not sure if using prefixes in the valuables is a good idea to keep
track of what item came from what selectbox but it's all I can come up
with right now.
//
Because I have multiple selectboxes to choose options from (there are
different kinds of items you can add to the selection).
On Oct 24, 12:21 am, Wizzud <[EMAIL PROTECTED]> wrote:
> Why clone()? Why not just move them from one to the other?
>
> (ids changed for simpler coding...)
>
> test 1
>
Why clone()? Why not just move them from one to the other?
(ids changed for simpler coding...)
test 1
test 2
test 3
>>
<<
$('button').each(function(){
var lr = this.id.split('_');
$(this).click(function(){
$('#' + lr[0] + ' option:selected').appendTo('#' + lr[
6 matches
Mail list logo