Below is the code.
<body>
<div class="test" >Test</div>
<script>
var count =1;
$('body').on('click', '.test', function () {
$('.test').attr('data-count',count);
count ++;
})
I want to add multiple values to data-count like this, data-count="1,2,3,4". How can i do that ?
dataattribute, how are you planning on reading them back in — have you thought about that?