mhenrixon
mhenrixon

Reputation: 6288

Exclude child elements from being jQuery selectable?

Is it possible to exclude certain child elements from being selected? Right now when I mark something as selectable it makes everything nested beneath a selectee which is a little annoying. I can see ways around this of course but it's rather a lot of work and if possible I'd try to avoid it.

Upvotes: 0

Views: 214

Answers (1)

John Dittmar
John Dittmar

Reputation: 161

You need to use the filter option when initializing. For example, if the selectee is an li element then use the following:

$( ".selector" ).selectable({ filter: "li" });

Upvotes: 1

Related Questions