需要一點幫助:我使用的是jquery treeview插件(這一個:http://bassistance.de/jquery-plugins/jquery-plugin-treeview/)。我想突出顯示當前的項目。我做這樣說:jquery treeview只突出顯示當前項目
CSS:
.filetree li .clicked {
font-weight: bold;
}
和JS代碼:
$('li').live('click', function(event){
event.stopPropagation();
console.log(this.id);
$('.clicked').removeClass('clicked');
$(this).addClass('clicked');
return false;
});
一切工作正常,但所有項目都與它的子元素突出在一起,根元素沒有整體突出顯示。
如何才能突出顯示當前項目?提前致謝!