On 3/1/06, Frank Schummertz <[EMAIL PROTECTED]> wrote: > It even works too good - my categories/subcategories do not change their > levels. I have a two-level tree only at the moment (ok, its not really a > tree, but this might change in the future). Can I avoid this behaviour? >
With an unmodified version(1.5.3) of scriptaculous (i.e. without the link provided before) I've just made this : --8<------------ <script type="text/javascript" src="/scripts/prototype/prototype.js"></script> <script type="text/javascript" src="/scripts/scriptaculous/scriptaculous.js"></script> <ul id="cats"> <li> <div>Cat A</div> <ul id="cat_a" style="min-height:1px;"> <li>A_1</li> <li>A_2</li> </ul> </li> <li> <div>Cat B</div> <ul id="cat_b" style="min-height:1px;"> </ul> </li> <li> <div>Cat C</div> <ul id="cat_c" style="min-height:1px;"> <li>C_1</li> </ul> </li> </ul> <script type='text/javascript'> Sortable.create("cat_a", {dropOnEmpty:true,containment:["cat_a","cat_b","cat_c"]}); Sortable.create("cat_b", {dropOnEmpty:true,containment:["cat_a","cat_b","cat_c"]}); Sortable.create("cat_c", {dropOnEmpty:true,containment:["cat_a","cat_b","cat_c"]}); Sortable.create("cats"); </script> --8<------------ Is this the behaviour you want ? _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs