I have this pen: https://codepen.io/nuzze/pen/gOYjKmx
As you see, I have 2 items with 3 properties (name, id, location).
So, when you click on the favorites button, a class named "favorites" its added to the 'li' tag and when you click again (unfavorite) the "favorites" class is removed. But now, I want to add statically the 'location' propertie as a class.
Let's see an example with 'Camp Nou' item:
{
name: 'Camp Nou',
id: 'campNou',
location: '10'
}
The result I want is the next one:
<li class="10"></li>
And if is marked as favorites..
<li class="10 favorites"></li>
Hope you can help me, I have been with this problem for a long time.
Thanks