문제

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,  
});
도움이 되었습니까?

해결책

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/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top