Added option to place index as data attribute