English 中文(简体)
Jquery Sortable, list withsection
原标题:Jquery Sortable, lists with subsections

I m试图利用吉克式可粉碎板制作一个可分类的清单。

我愿提出这样的名单。

  • Section 1
    • Sub Section 1
      • Item 1
    • Sub Section 2
      • Item 2
      • Item 3
      • Item 4
  • Section 2
    • Sub Section 3
      • Item 5
      • Item 6
    • Sub Section 4
      • Item 7
      • Item 8

在其级别上的项目必须保持其水平,I.E.这是错误的......

  • Section 1
    • Section 2

......

  • Item 1
  • Section 1
    • Item 2

我试图将其分解成可分的领域,但失败。 一切帮助都得到高度赞赏。

PS/ 在移解儿童物品时,必须携带<>。

最佳回答

这样做的方法是,确保每个被封不动的清单都有相同的类别,而且你对这个类别有一次性的约束力,也使名单无法理解。 例如:

HTML:

<ul class= list >
  <li>item1</li>
  <li>item2</li>
  <li>item3
    <ul class= list >
      <li>item 1</li>
      <li>item 2</li>
    </ul>
  </li>
</ul>

JS:

$(function() {
  $("ul.list").sortable({
    helper:  clone ,
    cursor:  move ,
    tolerance:  pointer 
  });
  $("ul.list").selectable();
  $("ul.list").disableSelection();
});

参看。 (一) 修改本条,但以其他方式从中删除,以作上述答复。

问题回答

暂无回答




相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签