Ah, that's interesting, hadn't thought of using it other than onload,
will have a look at that, thanks.

I think I've got to use html() to transfer the options so I can
preserve any optgroups, but I'll have a good look at your code.

On Sep 24, 6:25 pm, "Leonardo K" <[EMAIL PROTECTED]> wrote:
> I have a suggestion:
>
> Example: If u have a select multiple with few options already selected.
>
> When the plugin is activeted it move all options to another select but it
> lose all options selected before.
>
> Instead of this:
>
>         function moveAllOptions(from, to) {
>                 jQuery("#"+to).html(jQuery("#"+from).html())
>                         .find('option:selected')
>                         .attr("selected", false);
>                 jQuery("#"+from).html('');
>         }
>
> change for:
>
>         function moveAllOptions(from, to) {
>                 var dest = jQuery("#"+to);
>                 jQuery("#"+from).find("option").each(function(){
>                     dest.append(this);
>                 });
>                 jQuery("#"+from).html('');
>                 if (dest.find("option:selected").size() >= 1)
>                     addTo(to, from);
>         }
>
> I dont know if I make myself clear.
>
> On 9/24/07, Stephan Beal <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Sep 24, 4:12 pm, "george.gsgd" <[EMAIL PROTECTED]> wrote:
> > > Can anyone help me come up with a better name for this? I struggled to
> > > come up with 'Picklists', and I'm not sure it's particularly
> > > descriptive or obvious...
>
> > a) Linked Selection?
> > b) Chained Selection?
> > c) ... err... Natural Selection? ;)
> > d) s2s: Select To Select (sounds like an AT&T calling plan)
>
> > That's pretty slick, by the way. :)

Reply via email to