链接在UI Selectable内部不起作用

这些是来自JQuery网站的代码,我重写了一个内容:

 #feedback { font-size: 1.4em; } #selectable .ui-selecting { background: #FECA40; } #selectable .ui-selected { background: #F39814; color: white; } #selectable { list-style-type: none; margin: 0; padding: 0; width: 60%; } #selectable li { margin: 3px; padding: 0.4em; font-size: 1.4em; height: 18px; }   $(function() { $( "#selectable" ).selectable(); });  
  1. link can not click
  2. Item 2
  3. Item 3
  4. Item 4
  5. Item 5
  6. Item 6
  7. Item 7

似乎link inside lilink inside li不再起作用。那么,我如何重新构造代码以使li可以被选中并且链接仍然可以同时使用?

使用cancel (查看选项),如下所示:

 $(function() { $("#selectable").selectable({ cancel: 'a' }); }); 

看看它在这里工作。