I hav the following code:
<div id="puzzle">
<div id="divImage" style="float:left; cursor:
move;>test 1</
div>
<div id="divImage" style="float:left; cursor:
move;>test 2</
div>
<div id="divImage" style="float:left; cursor:
move;>test 3</
div>
<div id="divImage" style="float:left; cursor:
move;>test 4</
div>
</div>
Sortable.create("puzzle",
{tag:''div'',overlap:''horizontal'',constraint:false,scroll:''puzzle'',onUpdate:saveOrdering});
function saveOrdering()
{
alert("test");
}
Now when I move 1 of the divs the divs moves in a correct way but the
function saveOrdering is never fired.
If I change the div tags to img tags saveOrdering is fired.
Can''t I use div''s or is there an other problem?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---
Try this:
Sortable.create("puzzle",
{tag:''div'',overlap:''horizontal'',constraint:false,scroll:''puzzle'',onUpdate:function()
{saveOrdering}});
On Mar 20, 9:22 am, Yoki
<jeffrysteegm...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> I hav the following code:
>
> <div id="puzzle">
> <div id="divImage" style="float:left; cursor:
move;>test 1</
> div>
> <div id="divImage" style="float:left; cursor:
move;>test 2</
> div>
> <div id="divImage" style="float:left; cursor:
move;>test 3</
> div>
> <div id="divImage" style="float:left; cursor:
move;>test 4</
> div>
> </div>
>
> Sortable.create("puzzle",
>
{tag:''div'',overlap:''horizontal'',constraint:false,scroll:''puzzle'',onUpdate:saveOrdering});
>
> function saveOrdering()
> {
> alert("test");
>
> }
>
> Now when I move 1 of the divs the divs moves in a correct way but the
> function saveOrdering is never fired.
> If I change the div tags to img tags saveOrdering is fired.
>
> Can''t I use div''s or is there an other problem?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---
Slightly OT, but id values are meant to be unique within the page, so having four different divs with the same id may cause you trouble at some stage... http://www.w3.org/TR/html401/struct/global.html#adef-id FWIW, -- T.J. Crowder tj / crowder software / com On Mar 20, 1:22 pm, Yoki <jeffrysteegm...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I hav the following code: > > <div id="puzzle"> > <div id="divImage" style="float:left; cursor: move;>test 1</ > div> > <div id="divImage" style="float:left; cursor: move;>test 2</ > div> > <div id="divImage" style="float:left; cursor: move;>test 3</ > div> > <div id="divImage" style="float:left; cursor: move;>test 4</ > div> > </div> > > Sortable.create("puzzle", > {tag:''div'',overlap:''horizontal'',constraint:false,scroll:''puzzle'',onUpdate:saveOrdering}); > > function saveOrdering() > { > alert("test"); > > } > > Now when I move 1 of the divs the divs moves in a correct way but the > function saveOrdering is never fired. > If I change the div tags to img tags saveOrdering is fired. > > Can''t I use div''s or is there an other problem?--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---