user1834809
user1834809

Reputation: 1311

jquery ui selectable how to stop selecting inner elements?

I have tried to work out with jquery ui selectable but it is not working as expected. when i selecting list items the inner items are also selecting and i need add a class to selected items. here is the demo of my stuff.

Demo

$(".itemlist").selectable();

Upvotes: 2

Views: 245

Answers (2)

Rikki
Rikki

Reputation: 3518

Replace the below code in your javascript:

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

Hope it helps.

Upvotes: 1

Nicholas E.
Nicholas E.

Reputation: 109

Try this

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

Upvotes: 1

Related Questions