Mobius1 / Selectable

Touch enabled selectable plugin inspired by the jQuery UI widget.
MIT License
142 stars 22 forks source link

handle - how exclude interactive elements #68

Closed chrimez closed 11 months ago

chrimez commented 11 months ago

great approach ! Specifically trying to achieve a "negative selection" (exclusion), of tags.

Scenario: "selectable" uses filter: 'table tr'

Now I want to exclude anchor-tags from toggling selections of the row - because I need to use the href-link without toggling selection.

This has NOT worked for me, though: handle: 'td:not([data-id])', handle: ':not(a[href])' ,

Neither worked: positive selection handle: 'td.someClass' , when links only appear in td.noHandleClass

How could I achieve excluding (nested) "links" from acting as handles ?

chrimez commented 11 months ago

My own error. These 2 work fine:

handle: 'td:not([data-id])', 
handle: 'td.someClass' , 

The third one did not - maybe, due to its nested nature of html elements / html code.