Hey Rodrigo,

Apologies for the massive time in replying, I am very busy these days.

That is a great suggestion, and one which a few people have mentioned. I
will modify the official plugin source as soon as possible, but for now your
fix does just great :-)

All the best
--rob

On 9/22/07, Rodrigo Moraes <[EMAIL PROTECTED]> wrote:
>
>
> Hey Rob,
>
> Thanks for jqMultiSelects. Useful one. :)
>
> One suggestion: let the user decide the selectors that will be used
> for the elements, instead of forcing an ID. I modified it to allow
> this:
>
> jQuery.fn.multiSelect = function(to, button) {
>     return this.each(function() {
>         var select = this;
>         jQuery(this).dblclick(function() {
>             moveOptions(select, to);
>         });
>
>         if (typeof button != "undefined") {
>             jQuery(button).click(function() {
>                 moveOptions(select, to);
>             });
>         }
>     });
>
>     function moveOptions(from, to) {
>         jQuery(from).children("option:selected").each(function() {
>             jQuery(this)
>             .attr("selected", false)
>             .appendTo(to);
>         });
>     }
> };
>
> Then it can be called like this:
>
> $("#select_left").multiSelect("#select_right", "#options_right");
> $("#select_right").multiSelect("#select_left", "#options_left");
>
> Don't you think it is less restrictive?
> -- rodrigo
>



-- 
Rob Desbois
Eml: [EMAIL PROTECTED]
Tel: 07946 705987
"There's a whale there's a whale there's a whale fish" he cried, and the
whale was in full view.
...Then ooh welcome. Ahhh. Ooh mug welcome.

Reply via email to