开发者

JQuery UI selectable - how to disable deselecting elements?

When i click between elements i get situation when nothng is select开发者_Python百科ed. How to avoid that?


There is no easy way for this. You can't just return false in the unselecting event apparently.

Only thing I can think of is tap into the selecting and selected events yourself. In the selecting event you could use setTimeout to add the 'ui-selected' class back to the ui element that is being unselected after couple of hundreds of ms. In the selected event you could clearTimout that to cancel.

That or cancel every click outside the selectable elements.


Option : cancel may be helpful for your problem. I use as cancel: ".ui-selected",. This may be prevent from deselecting elements these are already selected.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜