Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8455221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:13:48+00:00 2026-06-10T12:13:48+00:00

In my HTML I have the following code. Depending on what’s being shown it

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T12:13:50+00:00Added an answer on June 10, 2026 at 12:13 pm

    You might just want to store your data in a single attribute using a JSON literal:

    <table id="dataTable" data-t="[1163, 1552, 1828]" ></table>
    
    var data = $("#dataTable").data('t'); //jQuery does the JSON parsing for us
    var diffs = [];
    
    for(var i = 0; i + 1 < data.length; i++) {
        diffs[i] = data[i + 1] - data[i];
    }
    
    alert(diffs.join(', '));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From this site: http://www.toymaker.info/Games/html/vertex_shaders.html We have the following code snippet: // transformations provided by
I have the following code in HTML and wanted to replace them using javascript
I have the following code in html, I cannot get the Function call back
I have the following code: HTML <div id='foo'> <input type='checkbox' value='english' name='bar[english]' /> <input
I have the following code in html: <select> <option text=item9 value=9></option> <option text=item10 value=10></option>
i have the following code to try and load a local html page in
I have the following code which loads and html file into a webview -
I have the following code to access a HTML table. my $table = $tree->look_down(_tag
I have the following code: var refreshId = setInterval(function() { $(#footad).html('myjshere'); }, 15500); Where
I have the following code: <html> <body> <div style=background-color: lightblue; onClick=alert(myArray[0][1])> this is a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.