Zelgod
February 7, 2014, 4:03am
1
I’m using webix.markup.init() to parse some html, im just wondering how do i add classes to elements in this way? for example …
<\ div data-id=“admin-module-list” data-view=“list”>
<\ ul data-view=“data”>
<\li> <— how do i add a css class to this item without javascript?
data-css doesn’t seem to work as a property.
Viktor
February 7, 2014, 4:52am
2
You can wrap content of li in extra tag with necessary css class, like next
http://webix.com/snippet/09d5c330
By using data-css, it is possible to define the css class for the whole list, but not for the separate item. For json init you can add logic, that will instruct to apply css class based on some data property. For html init you can’t define
Viktor
February 7, 2014, 4:57am
3
Starting from the next build, you will be able to use the normal css classes
<div data-id="admin-module-list" data-view="list">
<ul data-view="data">
<li>Item 1</li>
<li class='mycss'>Item 2</li>
Zelgod
February 7, 2014, 12:07pm
4
Thanks Viktor any idea when the next build is slated to release?
Viktor
February 10, 2014, 6:18am
5
We plan to release Webix 1.5 on Thursday ( February 13 )