I would like to select any element owning a class starting by a given string, here is an example where the classes start with fi-
<i class="fi-xmsl-user"></i>
<i class="fi-stsl-map"></i>
I would like to do this in pure JavaScript (no jQuery).
I already read the following questions:
- select class starting with jquery
- How to get all elements by class name?
- Jquery select first letter?
The last one is interesting, but I don't like the idea to loop over each element to check the classes.