Hi Cyrus,

I don't know much about script.aculo.us, but looking at it
(dragdrop.js), Sortable isn't a class (in the loose way we use that
word in this classless prototypical language JavaScript), it's just an
object with a bunch of functions assigned as properties.  So you won't
be able to extend it in this way.  Perhaps someone who's done more
with script.aculo.us can point you to a convenient way to achieve the
result you're looking for.

T.J. Crowder
tj / crowder software / com
Independent Software Engineer, consulting services available

On Jan 13, 1:27 pm, Cyrus <arianglan...@googlemail.com> wrote:
> Hi,
> I want to extend the Sortable class from the scriptaculous library.
> Where is my mistake? It's telling me SortableLabelList.create doesn't
> exist - I assumed it is inherited from Sortable.
> // extend
> SortableLabelList = Class.create(Sortable, {
>         // redefine onHover
>         onHover: function($super, element, dropon, overlap) {
>                 $super();
>                 console.log(element);
>                 console.log(dropon);
>                 console.log(overlap);
>         }
> });
> // create list
> SortableLabelList.create("...");
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to