HTML5 Data Bindings Support Product Page

Answered

Apply dynamic class or id on selected object

Asked 05 Feb 2014 23:49:17
1
has this question
05 Feb 2014 23:49:17 Nikolaos Beligiannis posted:
Hi. I am sure that it's easy to achieve just can't find out how. I have a repeat region and a detail region. I want to add a dynamic class to the selected object on my repeat region so it gets highlited when clicked. Spry had this by default, the active element was assigned a class value automatically for styling purposes. How can I achieve the similar here? Assign a class value of 'picked' when an item in my repeated region is clicked. Or how can I identify the active element on my repeat region so I style it properly.
Thank you.

Replies

Replied 06 Feb 2014 10:24:25
06 Feb 2014 10:24:25 Teodor Kuduschiev replied:
Hello Niko,

You can add the following code to your repeat element:
data-binding-class-XXXXXX="$selected"

Where XXXXX is the class name you want to assign. This will be added in the UI of the extension in the next updates

Reply to this topic