I searched the net a bit but did not find a solution for my problem. This is my selector:
jQuery('[data-group="' + a + '"]').show()
The a
is a text like swimming
or any word. In HTML it looks like this:
<div data-group="swimming">...</div>
So the above selector would show that div if a = swimming
. Now lets say that the data-group contains the word simming, but its not the only one, like this:
<div data-group="swimming,driving,flying">...</div>
How can I still select that div with a selector if a = swimming
? I hope you know what I mean :).
Thanks!