代码:
@( Html.Telerik().ComboBox()
.Name("cmbTest")
.ClientEvents(events => events
.OnOpen("oncmbTestOpen")
)
)
function oncmbTestOpen(e)
{
var index = 2;
// How to give the shade(default orange color) to the list item of particular index(2) in the telerik mvc combo box
}
打开组合框时,如何在telerik mvc组合框中将阴影(默认橙色)赋予特定索引(2)的列表项。
答案 0 :(得分:0)
您可以通过以下方式访问li元素:
function oncmbTestOpen(e){
var index = 2;
var $li = $(this).data('tComboBox').dropDown.$items.eq(index);
//$li.css('color', 'red');
}