When attr-for-selected changes, selected should update it's value to the value of the new attribute referenced by attr-for-selected of the currently selected item. Here's a demo. Select an item and then click the 'attr-for-selected = data-y' button - selected doesn't change.
When
attr-for-selected
changes,selected
should update it's value to the value of the new attribute referenced byattr-for-selected
of the currently selected item. Here's a demo. Select an item and then click the 'attr-for-selected = data-y' button -selected
doesn't change.