You can do the same as you’ve already done, the attribute selectors can be chained:
$('.my-class[data-id="' + dataId + '"][data-id-index="'+dataIdIndex+'"]').append(myText);
You can do the same as you’ve already done, the attribute selectors can be chained:
$('.my-class[data-id="' + dataId + '"][data-id-index="'+dataIdIndex+'"]').append(myText);