Page 2 of 2
How to assign html attribute to select component during mapping?
Posted: Thu Oct 31, 2013 7:51 pm
by Adam Garbinski
Hi Katya
It works now, but not exactly the way I wanted. After clicking It loops through all items on the list and displays them one after another. I suppose you wanted it to work that way but I need just one item - the one that was clicked. Can we achieve this with that code?
Cheers,
Adam
How to assign html attribute to select component during mapping?
Posted: Fri Nov 01, 2013 9:08 am
by Kateryna Grynko
Hi Adam,
Here is what you need:prealert($("[rerender=Subgroup][data-group]").find(":selected").attr('data-group'));/pre
How to assign html attribute to select component during mapping?
Posted: Fri Nov 01, 2013 5:48 pm
by Adam Garbinski
Hi Katya,
I get "undefined" again
Can you please doublecheck it?
How to assign html attribute to select component during mapping?
Posted: Fri Nov 01, 2013 8:13 pm
by Maryna Brodina
Hello! Please try this way prealert($("[rerender=Subgroup]:selected").attr('data-group'));/pre
How to assign html attribute to select component during mapping?
Posted: Fri Nov 01, 2013 8:20 pm
by Adam Garbinski
Respect to the BEST SUPPORT IN THE WORLD 
It is working now!
Thank you. Hope it will be helpful for anyone trying to do the same.
Cheers!