Hi,

That code looks...unexamined.  In addition to the typo Alex pointed
out (which will prevent it from ever entering the loop, presumably),
there's the pretty major issue of what it would do inside the loop if
it ever entered it:  Repeatedly re-search for elements of class "drag"
and then pass an array of them into the Draggable constructor.
Draggable doesn't accept an array (not according to the docs[1],
anyway), it accepts the ID of an element (or the element itself).

[1] http://wiki.github.com/madrobby/scriptaculous/draggable
--
T.J. Crowder
tj / crowder software / com
Independent Software Engineer, consulting services available


On Jun 18, 1:36 pm, Rafael M Ximenes <[email protected]> wrote:
> Well.
>
> Still with the code provided by the author's site, the important
> section of code was:
>
> function () {
>   ...
>   var drags = $$('.drag');
>   for (var i=0; i<drags.lenght;i++){
>     new Draggable($$('.drag'));
>   }
>   initCorners('.drag',settings);
> ...
>
> }
>
> :)
>
> On Jun 17, 2:48 pm, Rick Waldron <[email protected]> wrote:
>
> > Before I take a look at your issue... I have a rewrite of CurvyCorners that
> > i did that makes it run way faster. I was using it in a project and was
> > annoyed by how long it took to render the corners. I can't say its any
> > cleaner, but I corrected an unecessary loop. I've attched the rewrite to
> > this email along with an  example usage (same file, its at the bottom).
>
> > Can you post your code?http://jsbin.com
>
> > Rick
>
> > On Wed, Jun 17, 2009 at 9:58 AM, Rafael M Ximenes <[email protected]>wrote:
>
> > > Hi, everybody!
>
> > > I'm a Brazilian WebDev and I've found  a script to round corners
> > > without images (Script's name is Curvy Corners:
> > >http://www.curvycorners.net/demos/).
> > > I was trying to round corners of the draggables, but they lose your
> > > functions.
>
> > > Some help?
>
> > > Regards.
> > > Rafael
>
> >  curvy-doesnt-suck.js
> > 51KViewDownload
>
>
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to