Question

I am crating a windows like interface where I have a canvas and into it I can append multiple icons dynamically. I have set the canvas to selectable. The problem is that when I add new icons, I can't select them.

I tried adding ui-selectee class to the icon but it doesn't work either.

$('.canvas').selectable({ 
   filter: $('.icons'),
   autoRefresh: true,  
});
Was it helpful?

Solution

Try to add param 'cancel':

$('.canvas').selectable({ 
   filter: $('.icons'),
   cancel: 'a',
   autoRefresh: true,  
});

Or delay param, his helps prevent unwanted selections when clicking on an element. http://api.jqueryui.com/1.8/selectable/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top