开发者

on an unordered list, how do I restrict one list item from being selectable?

A quick sketch of my situation is:

<ul id="selectable">
  <li class="t开发者_开发问答able" id="header-row">
    <ul class="row">
      ...
    </ul>
  </li>
  <li class="table">
    <ul class="row">
      ...
    </ul>
  </li>
  ...
</ul>

How do I disable li#header-row from being selectable?


You can use the filter option to include (or with :not, exclude) options

$("#selectable").selectable({
    filter: ":not(#header-row)"
});

JSFiddle: http://jsfiddle.net/M7pmU/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜