There's a similar answer here but it's somehow different and doesn't fit my case, I can't just do a join()
:
an array of strings as a jQuery selector?
I have a dynamic array that looks like this,
['abc', 'def', 'ghi']
I need to do a Selector string as follows including all these values as a data-event
attribute as follows:
$('li.event[data-event="' + /*every element from the array*/ + '"]');
Is there a way to avoid looping?