-
Notifications
You must be signed in to change notification settings - Fork 22
ignore
Karl edited this page Sep 29, 2018
·
6 revisions
Define descendants of selectable elements that can be clicked. Can be a CSS3 selector string or an array of CSS3 selector strings. Any descendant defined will not trigger the instance to start selecting / toggling when clicked on.
Allow only span
elements and elements with the .clickable
className.
<ul>
<li class="item">
<a href="#" class="clickable">I can be clicked</a>
<a href="#" class="unclickable">I can't be clicked</a>
<span>I can be clicked</span>
</li>
<li class="item">
<a href="#" class="clickable">I can be clicked</a>
<a href="#" class="unclickable">I can't be clicked</a>
<span>I can be clicked</span>
</li>
...
</ul>
new Selectable({
filter: ".item",
ignore: [".clickable", "span"]
});