Jquery 使悬停突出显示FancyTree中的整个li行
我正在使用FancyTree,希望在li项目悬停时突出显示整行。目前,它只高亮显示li本身,因此高亮显示不会一直延伸到(父ul的)左侧边距 你可以在这里看到小提琴: 这在CSS中可能吗?还是需要一些JavaScript?请记住,我无法手动设置li缩进,因为它们是无限嵌套的 HTML: 非常感谢试着这样做 在ui.fancytree.css行号547中Jquery 使悬停突出显示FancyTree中的整个li行,jquery,css,hover,fancytree,Jquery,Css,Hover,Fancytree,我正在使用FancyTree,希望在li项目悬停时突出显示整行。目前,它只高亮显示li本身,因此高亮显示不会一直延伸到(父ul的)左侧边距 你可以在这里看到小提琴: 这在CSS中可能吗?还是需要一些JavaScript?请记住,我无法手动设置li缩进,因为它们是无限嵌套的 HTML: 非常感谢试着这样做 在ui.fancytree.css行号547中 .fancytree-plain span.fancytree-node:hover span.fancytree-title{ backgr
.fancytree-plain span.fancytree-node:hover span.fancytree-title{
background-color: #eff9fe;
border-color: #70c0e7;
width: inherit;
}
使用
所以fancytree“wide”扩展正好做到了这一点:这不会突出显示整个li元素行吗?
span.fancytree-node:hover {
background: #f2f6f9 !important;
color: #5b9bd1 !important;
cursor:pointer;
}
span.fancytree-node:hover > span.fancytree-title{
color: #5b9bd1 !important;
}
.fancytree-plain span.fancytree-node:hover span.fancytree-title{
background-color: #eff9fe;
border-color: #70c0e7;
width: inherit;
}
$("span.fancytree-node:").hover( function () {
$(this).css({"background-color":"#eff9fe"});
},
function () {
$(this).css({"background-color":"white"});
}
)