demo.js 542 B

12345678910111213141516171819202122232425262728
  1. $(document).ready(function()
  2. {
  3. // activate Nestable for list 1
  4. $('#nestable1').nestable({
  5. group: 1
  6. });
  7. // activate Nestable for list 2
  8. $('#nestable2').nestable({
  9. group: 1
  10. });
  11. var $expand = false;
  12. $('#nestable-menu').on('click', function(e)
  13. {
  14. if ($expand) {
  15. $expand = false;
  16. $('.dd').nestable('expandAll');
  17. }else {
  18. $expand = true;
  19. $('.dd').nestable('collapseAll');
  20. }
  21. });
  22. $('#nestable3').nestable();
  23. });