jQuery UI 라이브러리 selectable() 사용. 선택 가능한 목록 항목 내의 링크는 마우스 오른쪽 버튼으로 클릭하고 새 창이나 탭에서 열 때만 클릭시 추적되지 않습니다.jQuery UI 선택 가능, 클릭시 따라 가기 링크 없음
HTML
<ul class="selectable-list">
<li>
<p>Visit Google.</p>
<a href="http://www.google.com">Google</a>
</li>
<li>
<p>Visit Apple.</p>
<a href="http://www.apple.com">Apple</a>
</li>
<li>
<p>Visit Microsoft.</p>
<a href="http://www.microsoft.com">Microsoft</a>
</li>
</ul>
CSS
.selectable-list li.ui-selected, .selectable-list li.ui-selected:hover {
background-color: #ccc;
}
JS
$(document).ready(function(){
$(".selectable-list").selectable();
});
원하는 링크를 찾은 후 선택 가능 모드를 재개 할 수 있습니까? – windsound
오, 당신은 방금 코딩 시간을 절약했습니다. 고맙습니다! – Slavic
나는 이것을 투표했다. 그러나 지연 옵션이 내 유스 케이스에 더 좋다는 것을 알아 냈다. http://api.jqueryui.com/selectable/#option-delay – Doug