Add a class on Contecxt Menu ?

I have the code to show the context menu and I would like to add a Class on the items of context menu as I do with IDs

that.add({ id: sourceItem.id + index, value: $(item).attr('title'), href: $(item).attr('href') }); 

		webix.ui({
		    view:"contextmenu",
		    id: container + "_menu",
		    width: 200,
		    on:{
			    onBeforeShow:function(){
			    	
			    	var context = this.getContext();
			      	var grid = context.obj;
			   		var itemId = context.id;  
			      	var sourceItem = grid.getItem(itemId);
				      	
			      	// Get the <a href> elements as array from actions column of the clicked row
			      	var links = $(sourceItem.actions).toArray();  
			      	that = this;
			      	
			      	this.clearAll();
			      	$.each(links, function(index, item){
			      		// Add them in the context
			      		that.add({ id: sourceItem.id + index, value: $(item).attr('title'), href: $(item).attr('href') }); 		       
			    		
			    		// If has disabled class then disable this menu
			    		if ( $(item).hasClass('disabled') || $(item).attr('disabled') ) {
			      			that.addCss( sourceItem.id + index, "disabled" );
			    		}		      			
				    });
				}
			}	 
		}).attachTo( grid[gridId] );

Hello,

You can add the $css property to a menu item to set the CSS class to it: http://webix.com/snippet/3a1086ef

This is how it looks in dynamics:

//assign class
var item = menu.getItem(id);
item.$css = "green";
//paint and save item
menu.updateItem(id, item);