-3

I am using this html table , i want to set current time line in html td. For example current time is 9 AM then set current time line on 9 AM column if time is 10 AM then current time line move to next column.Please help me if any plugin related to this task tell me.Thanks in advance.

<div class="table-responsive custom">
    <div class="col-sm-1 mov_div"></div>
        <table class="table table-bordered ">
            <thead>        
                 <tr>                                      
                    <th></th>
                    <th><p>Queed</p></th>
                    <th><p>7:00</p></th>
                    <th><p>8:00</p></th>
                    <th><p>9:00</p></th>
                    <th><p>10:00</p></th>
                    <th><p>11:00</p></th>
                </tr>
            </thead>
            <tbody class="context-menu-one">
                <!--  <tr> </tr> -->
                 <tr>
                    <td>data1</td>
                    <td></td>
                    <td><img id="vesselIcon1" src="vesselsIcon/vess-arriving.gif" style= "width:90px;"/></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td>Some Content</td>
                </tr>
                <tr>
                    <td>data2</td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td><img id="vesselIcon2" src="vesselsIcon/vess-arriving.gif" style= "width:90px;"/></td>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                     <td>data 3</td>
                     <td></td>
                     <td></td>
                     <td><img id="vesselIcon3" src="vesselsIcon/vess-arriving.gif" style= "width:90px;"/></td>
                     <td></td>
                     <td></td>
                     <td></td>
                </tr>
          </tbody>
       </table>
  </div> 

My html table like this image

enter image description here

I Want like time line like below image

enter image description here

Naresh Kumar
  • 794
  • 8
  • 25

2 Answers2

1

You can use line class div. Please try this code.

 .line{
    z-index:20;
    position:absolute;
    left:100;
    width: 2px;
    height: 200px;
    border-right: 2px solid green;
    position: absolute;
  }
  <div class="line"></div>
artgb
  • 3,177
  • 6
  • 19
  • 36
0

Solved this problem using jQuery setTimeout function. Added line and In every one-minute moving the line using setTimeout function.

setTimeout( function() {
    // code
  }, 1000 );

Useful links for setTimeout.

  1. How to wait 5 seconds with jQuery?
  2. https://api.jquery.com/deferred.promise/
Naresh Kumar
  • 794
  • 8
  • 25