In my HTML I have the following code. Depending on what’s being shown it can
have 0,1,2,3,4 or 5 different time points. The first time period of interest is data-t0
and then next is data-t1 minus data-t0 etc.
<table id="dataTable" data-t2="1828" data-t1="1552" data-t0="1163" ></table>
<h1>Grid data</h1>
Is there a way that I can add the times to the h1 tag like this if there at least exists a
timing point data-t0?
<h1 title="Response time: t1=1163, t2=11, t3=276">Grid data</h1>
The problem I have is that I need some way for it to go through and add in the times
for each of the timing points. I can do simple jQuery but I don’t know how to make it
iterate over each of the timing points.
You might just want to store your data in a single attribute using a JSON literal: