Using jQuery, how can I select elements by multiple data-attributes?
Do the same as you already did... the attribute selectors can be chained:
$('.my-class[data-id="' + dataId + '"][data-id-index="'+dataIdIndex+'"]').append(myText);
Do the same as you already did... the attribute selectors can be chained:
$('.my-class[data-id="' + dataId + '"][data-id-index="'+dataIdIndex+'"]').append(myText);