0
我已经成功实现了JQuery UI可选,但需要选定的项目才能具有特定的样式。我知道我可以使用这个:JQuery UI可选CSS样式
.ui-selected{
background-color:orange;
}
但真的我想添加类.selected到选定的项目(其实是锂标签)。
任何帮助,将不胜感激。
我已经成功实现了JQuery UI可选,但需要选定的项目才能具有特定的样式。我知道我可以使用这个:JQuery UI可选CSS样式
.ui-selected{
background-color:orange;
}
但真的我想添加类.selected到选定的项目(其实是锂标签)。
任何帮助,将不胜感激。
仅供参考,我结束了使用此:
$(".selectableTileList").selectable({
stop: function(event, ui) {
//Stop function
$('.ui-selected').addClass('selected');
},
start: function(event, ui) {
$('.ui-selected').removeClass('selected');
},
selecting: function(event, ui) {$('.ui-selected').addClass('selected');}
});
感谢dwhite.me他的评论
上面的选择,现在我想通过UI文件中搜索找到引用.ui-selected ... – StorySystems
$('。ui-selected')。addClass('selected'); ? – ggdx
我将如何将其与主要功能集成在一起,我该如何做出停止:事件工作?谢谢 – StorySystems