I'm wondering how I can change the html content of a div.
This is the starting point:
<div id="container">
<div class="fruits">apple</div>
<div class="fruits">banana</div>
<div class="fruits">strawberry</div>
</div>
Output on page:
apple
banana
strawberry
The output should be changed to:
cat
dog
fish
...or something like this.
I guess I have to iterate over the class "fruits" with .each() or something. I know how to change single elements or content of a single div, but i don't understand how that works when you have the same class for multiple times.
class="fruits"
class="fruits"
class="fruits"
....
Hope you can help.