HTML5 Data Bindings Support Product Page
Answered
Assign class to repeat region
Asked 20 Sep 2016 21:05:20
1
has this question
20 Sep 2016 21:05:20 Dennis Maier posted:
how can I assign a class to the repeat region (row) based on a bindings value. Example, I want to style the row by adding a background image only when {{AKC_BOM}} == 'Y'.Thanks,
Dennis
Replies
Replied 21 Sep 2016 07:03:21
21 Sep 2016 07:03:21 Teodor Kuduschiev replied:
Hi Dennis,
You can do this like:
data-binding-class-CLASSNAME="{{AKC_BOM == 'Y'}}"
just change classname with the class you need.
You can do this like:
data-binding-class-CLASSNAME="{{AKC_BOM == 'Y'}}"
just change classname with the class you need.
Replied 21 Sep 2016 18:09:17
21 Sep 2016 18:09:17 Dennis Maier replied:
Teodor,
I had tried that before I asked for help, and could not get it to work.
Now with further investigation (Firebug) I see the case of the class is being changed.
When I have:
data-binding-class-bomBadge1="{{AKC_BOM == 'Y'}}"
Firebug shows the class has changed to:
class="bombadge1"
when I change the style from .bomBadge1 to .bombadge1 it works
Dennis
I had tried that before I asked for help, and could not get it to work.
Now with further investigation (Firebug) I see the case of the class is being changed.
When I have:
data-binding-class-bomBadge1="{{AKC_BOM == 'Y'}}"
Firebug shows the class has changed to:
class="bombadge1"
when I change the style from .bomBadge1 to .bombadge1 it works
Dennis