my project is asp.net MVC, using Telerik MVC combobox. I can change the sytle of the first item if I use:
var item = combobox.dropDown.$items.first();
item.addClass('test');
Or change all items, using:
combobox.dropDown.$items.addClass('test');
But I need to change just specific items (based on a model), I tried:
combobox.dropDown.$items[1].addClass('test');
I get this error:
Object doesn't support property or method 'addClass‘
If it’s a jQuery object, you should replace:
With:
$items[1]gives you the DOM object which doesn’t have the jQueryaddClassfunction.$items.eq(1)gives you the jQuery object which has the jQueryaddClassfunction.