HTML5 Data Bindings Support Product Page
Answered
Assign class to repeat region
Asked 8 years ago
1
has this question
8 years ago 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 8 years ago
8 years ago 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 8 years ago
8 years ago 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