<TD><script type="text/java script">
$(document).ready(function(){
$("#sliding div").hide();
$("#show_hide").show();
$('#show_hide').click(function(){
$("#sliding Div").slide Toggle();
});
});
</script>
while ($row1=mysql_fetch_array($sql))
{
?>
<div class="services_box">
<!--<div class="services_box_title"><h3 align="center">Location: </h3></div>-->
<div class="services_box_mid_cont">
<div class="inner 3" style="padding;">
<div class="inner 3_left"><a h ref="#"><img src="upload_image/
<?php echo $row 1['image']; ?>" height="100px" width="150px"/></a></div>
<div class="inner3_right">
<div class="heading">
<label id=titl><a href="view.php?Post_id=
<?php echo $row1['Post_id'];?>"><?php echo $row1['title'];?></a></label></div>
<div class="para"><div style="width:380px; height:80px; overflow:auto;">
<a id="desc" href="#"> <label id=desc><?php echo $row1['description'];?>
</label> </a></div> </div>
<div class="btn"><a href="#" id="show_hide">
<img src="images/button-reply.png" width="76" height="27" /></a></div>
</div>
<div class="clear"></div>
<div class="date_time"><h3>Posted On :<?php echo $row1['date_time'];?></h3></div>
<?php echo $row1['city']; ?>
<div class="contact_no">
<h3 align="right">Contact:<?php echo $row1['user_mobno'];?> </h3></div>
</div>
</div>
<div class="clear"></div>
</div>
<div class="sliding Div" id="sliding Div">
<div class="clear"></div>
<table width="69" style="border:#CCCCCC 1px solid;">
<tr class="head_bg">
<TD width="132">Name</TD>
<TD width="100">Email Id</TD>
<TD width="194">Mobile</TD>
</tr>
<tr><TD col span="7" style="border-bottom:#CCCCCC 1px solid;"></td></tr>
<tr class="head_bg">
<TD width="400"><input type=text></TD>
<TD width="400"><input type=text></TD>
<TD width="400"><input type=text></TD>
</tr>
</table></div>
this code is working for a single div only not for the all div. here is my div in while loop;i am trying my best to execute the code successfullyy but it is not working.
plz immidiate ly tell me the solution..
$("#sliding Div").slide Toggle();
should be
$("#sliding Div").slideToggle();
You have give the id name as:
id="sliding Div"
Change it to id="sliding_div" in the id there should not be space.
OR you can use the below JS:
$(document).ready(function(){
$(".sliding").hide();
$("#show_hide").show();
$('#show_hide').click(function(){
$(".sliding").slideToggle();
});
});
Related
So to sum up my problem and what I'm trying to do:
I'm trying to code an Attendance feature in my PHP Website where the admin first chooses the Class he wants to mark the Attendance for, and then he's taken to a new page with a table that ONLY displays students from THAT class. He enter the date/status of each student and presses Submit, and multiple rows are inserted into the "attendance" table.
Now, this was working perfectly before. The only new addition to this feature was the "Class" feature, now each student has a class (you might call it grade in your region). Before, they didn't.
So naturally, the table's SELECT query went from
$rows2 = $conn->query("SELECT * FROM students")->fetchAll(PDO::FETCH_ASSOC);
to:
$rows2 = $conn->query("SELECT * FROM students WHERE grade_id = $grade")->fetchAll(PDO::FETCH_ASSOC);
This little addition has completely messed up my INSERT query, which works fine when I exclude the "WHERE" clause. Below, I'm attaching code for two pages - one is ChooseClass.php where admin picks the Class he wants to add Attendance for. This page basically sends the chosen class ID to the 2nd page, which is AddAttendance.php.
ChooseClass.php:
<?php include('../db.php');
session_start();
$email = $_SESSION["email"];
$user = $conn->query("SELECT * from admin where email = '$email' ")->fetchAll(PDO::FETCH_ASSOC);
$userID = $user[0]['admin_id'];
$someotherRow = $conn->query("SELECT * FROM grade")->fetchAll(PDO::FETCH_ASSOC);
?>
<!DOCTYPE html>
<html>
<?php include('adminheader.php'); ?>
<body style="background-color: #5e72e4 !important;">
<!-- Sidenav -->
<?php include('adminsidebar.php'); ?>
<div class="main-content" id="panel">
<!-- Topnav -->
<?php include('admintopbar.php'); ?>
<!-- Header -->
<!-- Header -->
<div class="header bg-primary pb-6" style="background-color: #5e72e4 !important;">
<div class="container-fluid">
<div class="header-body">
<div class="row align-items-center py-4">
<div class="col-lg-6 col-7">
<h6 class="h2 text-white d-inline-block mb-0">Attendance Managament</h6>
</div>
</div>
<!-- Card stats -->
<div class="row">
<div class="col-lg-12">
<div class="card">
<!-- Card body -->
<div class="card-header">Choose a Class</div>
<div class="card-body">
<div class="table-responsive" style="overflow-y: scroll; height: 600px;">
<table class="table align-items-center table-dark table-flush">
<thead class="thead-dark">
<tr>
<th scope="col" class="sort" data-sort="name">Class Name</th>
<th scope="col" class="sort" data-sort="status">Action</th>
</tr>
</thead>
<tbody class="list">
<?php
foreach ($someotherRow as $row) { ?>
<tr>
<th scope="row">
<div class="media align-items-center">
<div class="media-body">
<span class="name mb-0 text-sm"><?php echo $row['grade_name']; ?></span>
</div>
</div>
</th>
<td>
<form action="" method="POST">
<a type="submit" href="adminmarkattendance.php?gradeid=<?php echo $row['grade_id']; ?> " class="btn btn-primary">Select</a>
</form>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Page content -->
<div class="container-fluid mt--6">
<!-- background-color: #5e72e4 !important; height: 63.9vh; -->
</div>
</div>
</body>
</html>
AddAttendance.php:
<?php include('../db.php');
session_start();
$email = $_SESSION["email"];
$user = $conn->query("SELECT * from admin where email = '$email' ")->fetchAll(PDO::FETCH_ASSOC);
$userID = $user[0]['admin_id'];
$grade = 0;
if (isset($_GET['gradeid'])) {
$grade = $_GET['gradeid'];
}
$rows2 = $conn->query("SELECT * FROM students WHERE grade_id = $grade")->fetchAll(PDO::FETCH_ASSOC);
$count = count($rows2);
if (isset($_POST["submit"])) {
for ($i = 0; $i < $count; $i++) {
$student_id = $_POST["id"][$i];
$status = $_POST['options'][$i];
$grade_id = $_POST['grade_id'];
$date = $_POST['attendancedate'];
$date = date('Y-m-d', strtotime($date));
$queryInsert = $conn->prepare("INSERT
into attendance
(
student_id,
grade_id,
date,
status
)
values
(
$student_id,
$grade_id,
'$date',
'$status'
)
");
$queryInsert->execute();
}
echo "<script> location.replace('chooseclass.php'); </script>";
}
?>
<!DOCTYPE html>
<html>
<?php include('adminheader.php'); ?>
<body style="background-color: #5e72e4 !important;">
<!-- Sidenav -->
<?php include('adminsidebar.php'); ?>
<div class="main-content" id="panel">
<!-- Topnav -->
<?php include('admintopbar.php'); ?>
<!-- Header -->
<!-- Header -->
<div class="header bg-primary pb-6" style="background-color: #5e72e4 !important;">
<div class="container-fluid">
<div class="header-body">
<div class="row align-items-center py-4">
<div class="col-lg-6 col-7">
<h6 class="h2 text-white d-inline-block mb-0">Mark Attendance</h6>
</div>
</div>
<!-- Card stats -->
<div class="row">
<div class="col-lg-12">
<form action="adminmarkattendance.php" method="post">
<div class="row">
<div class="col">
<div class="card bg-default shadow">
<div class="card-header bg-transparent border-0">
<div class="form-inline">
<div class="col-lg-6">
<h3 class="text-white mb-0">Registered Students</h3>
</div>
<div class="col-lg-6">
<div class="form-group">
<input style="width: 100%;" class="form-control" name="attendancedate" type="date" required>
</div>
</div>
</div>
</div>
<div class="table-responsive" style="overflow-y: scroll; height: 600px;">
<table class="table align-items-center table-dark table-flush">
<thead class="thead-dark">
<tr>
<th scope="col" class="sort" data-sort="name">Avatar</th>
<th scope="col" class="sort" data-sort="name">Student Name</th>
<th scope="col" class="sort" data-sort="status">Phone Number</th>
<th scope="col" class="sort" data-sort="status">Age</th>
<th scope="col" class="sort" data-sort="status">Gender</th>
<th scope="col" class="sort" data-sort="status">Address</th>
<th scope="col" class="sort" data-sort="status">Action</th>
</tr>
</thead>
<tbody class="list">
<?php
foreach ($rows2 as $row) { ?>
<tr>
<td>
<img src="<?php echo '../profileImages/' . $row['profile_image'] ?>" width="45" height="45" alt="">
<input type="hidden" name="id[]" value="<?php echo $row['student_id']; ?>">
<input type="hidden" name="grade_id" value="<?php echo $grade ?>">
</td>
<th scope="row">
<div class="media align-items-center">
<div class="media-body">
<span class="name mb-0 text-sm"><?php echo $row['fname'] . ' ' . $row['lname']; ?></span>
</div>
</div>
</th>
<td>
<span class="badge badge-dot mr-4">
<span class="status"><?php echo $row['phonenumber']; ?></span>
</span>
</td>
<td>
<span class="badge badge-dot mr-4">
<span class="status"><?php echo $row['age']; ?></span>
</span>
</td>
<td>
<span class="badge badge-dot mr-4">
<span class="status"><?php echo $row['gender']; ?></span>
</span>
</td>
<td>
<span class="badge badge-dot mr-4">
<span class="status"><?php echo $row['address']; ?></span>
</span>
</td>
<td>
<select class="form-control" name="options[]">
<option value="Present" selected>Present</option>
<option value="Absent">Absent</option>
</select>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="text-center">
<button type="submit" name="submit" style="width: 100%;" class="btn btn-warning">Mark Attendance</button>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- Page content -->
<div class="container-fluid mt--6">
<!-- background-color: #5e72e4 !important; height: 63.9vh; -->
</div>
</div>
</body>
</html>
I've spent 2 hours looking at this code and I can't figure out why the addition of WHERE breaks my code. I've also var_dumped most of the variables, just to check if I was entering some NULL value and I'm not. So kindly look into it and see if you can figure out why data is not being inserted into the database..
You are sending gradeid value in -
href="adminmarkattendance.php?gradeid= "
And getting value in AddAttendance.php
So, first give right path and second, there is also a space within ahref. So, when you try to get the value use trim, it will remove spaces -
$grade = trim($_GET['gradeid']);
This code would complete the table, that work find. The problem with this is that when i can show a dynamic popup only work in the first row but in anyelse don't work
<tr>
<td><img src="../mysql/img/<?php echo $fila['imagen'];?>" class="logoempresa" alt="Logo empresa"></td>
<?php $fila['id'];?>
<td><?php echo $fila['empresa'];?></td>
<td><?php echo $fila['puesto'];?></td>
<td><?php echo $fila['jornada'];?></td>
<td><?php echo $fila['salario'];?></td>
<td><?php echo $fila['zona'];?></td>
<td>
<div class="popup-flex">
<button id="popup-btn">Click Me</button>
</div>
<div id="popup-wrapper" class="popup-container">
<div class="popup-content">
<span id="close">×</span>
<p class="observaciones"><?php echo $fila['observaciones'];?></p>
</div>
</div>
</td>
try
<button id="<?= $fila['id'];?> " class="popup-btn">Click Me</button>
jquery
$('.popup-btn').on('click', function(e){
e.preventDefault()
let id = $(this).attr('id')
//do magic
})
Using vanilla Javascript you might try like this. Remove the ID attributes or convert to dataset versions such as data-id="popup-wrapper" rather than id="popup-wrapper" and use the click event triggered by the button to locate that element in the DOM tree. From that point you can navigate up the DOM tree and query once more to find the POPUP. Once you have identified the popup - open it or do something.. here I just toggle a className.
All the PHP tags below have been removed simply to facilitate the snippet/demo...
const clickhandler=function(e){
let popup=this.parentNode.parentNode.querySelector('[data-id="popup-wrapper"]');
popup.classList.toggle('popped');
/* Open the popup... sing and dance! */
};
document.querySelectorAll('.popup-flex > [data-id="popup-btn"]').forEach( bttn=>bttn.addEventListener('click',clickhandler))
.popped{border:2px solid red;}
td{border:1px solid grey}
<table>
<tr>
<td><img src="//placekitten.com/100/100" class="logoempresa" alt="Logo empresa"></td>
<td>$fila['empresa']</td>
<td>$fila['puesto']</td>
<td>$fila['jornada']</td>
<td>$fila['salario']</td>
<td>$fila['zona']</td>
<td>
<div class="popup-flex">
<button data-id="popup-btn">Click Me</button>
</div>
<div data-id="popup-wrapper" class="popup-container">
<div class="popup-content">
<span data-id="close">×</span>
<p class="observaciones">$fila['observaciones']</p>
</div>
</div>
</td>
</tr>
<tr>
<td><img src="//placekitten.com/100/100" class="logoempresa" alt="Logo empresa"></td>
<td>$fila['empresa']</td>
<td>$fila['puesto']</td>
<td>$fila['jornada']</td>
<td>$fila['salario']</td>
<td>$fila['zona']</td>
<td>
<div class="popup-flex">
<button data-id="popup-btn">Click Me</button>
</div>
<div data-id="popup-wrapper" class="popup-container">
<div class="popup-content">
<span data-id="close">×</span>
<p class="observaciones">$fila['observaciones']</p>
</div>
</div>
</td>
</tr>
<tr>
<td><img src="//placekitten.com/100/100" class="logoempresa" alt="Logo empresa"></td>
<td>$fila['empresa']</td>
<td>$fila['puesto']</td>
<td>$fila['jornada']</td>
<td>$fila['salario']</td>
<td>$fila['zona']</td>
<td>
<div class="popup-flex">
<button data-id="popup-btn">Click Me</button>
</div>
<div data-id="popup-wrapper" class="popup-container">
<div class="popup-content">
<span data-id="close">×</span>
<p class="observaciones">$fila['observaciones']</p>
</div>
</div>
</td>
</tr>
</table>
I was set up my index page with pending order,sales and completed order. Each and every minutes that data are changed.so i decided to refresh particular div by jquery and got succeed by changing data dynamically.But issues start on my style.When the div was reloded style of card was distract.I dont know why this happened.
<div class="row" >
<div class="col-xl-3 col-lg-3 col-md-6 col-sm-12 col-12" id="here">
<div class="row">
<div class="col-xl-12">
<div class="card border-3 border-top border-top-primary">
<div class="card-body">
<h5 class="text-muted">Total Sales</h5>
<div class="metric-value d-inline-block">
<h1 class="mb-1 text-center"><? if($total != '') { echo "Rs: ".$total; } else { echo "Rs: 0";} ?></h1>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xl-12">
<div class="card border-3 border-top border-top-primary">
<div class="card-body">
<h5 class="text-muted">Complted Order</h5>
<div class="metric-value d-inline-block">
<h1 class="mb-1 text-center"><?= $complte." Nos"; ?></h1>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xl-12">
<div class="card border-3 border-top border-top-primary">
<div class="card-body">
<h5 class="text-muted">Pending Order</h5>
<div class="metric-value d-inline-block">
<h1 class="mb-1 text-center"><?= $pending." Nos"; ?></h1>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-xl-9 col-lg-12 col-md-6 col-sm-12 col-12">
<?
$orderquery = mysqli_query($conn,"SELECT * FROM ordermaster o LEFT JOIN customer c ON o.custid = c.custid WHERE o.status = 'p' AND orderdt = CURRENT_DATE() ");
?>
<div class="card">
<h5 class="card-header">Recent Orders</h5>
<div class="card-body p-0">
<div class="table-responsive">
<table class="table">
<thead class="bg-light">
<tr class="border-0">
<th class="border-0">#</th>
<th class="border-0">Name</th>
<th class="border-0">Phone</th>
<th class="border-0">Address</th>
<th class="border-0">Pincode</th>
<th class="border-0">City</th>
<th class="border-0">Order Time</th>
<th class="border-0">Amount</th>
<th class="border-0">View</th>
</tr>
</thead>
<tbody>
<?
$count = 1;
while($res = mysqli_fetch_array($orderquery))
{
?>
<tr>
<td><?= $count; ?></td>
<td><?= $res['name']; ?> </td>
<td><?= $res['phone']; ?> </td>
<td><?= $res['addr1']."/".$res['addr2']; ?> </td>
<td><?= $res['pincode']; ?> </td>
<td><?= $res['city']; ?> </td>
<td><?= $res['orderdtm']; ?> </td>
<td><?= $res['net']; ?> </td>
<td><button class="btn btn-sm btn-outline-primary" title="View Product" onclick="del('<? echo $res['orderid'];?>')" value="id" data-toggle="modal" data-target="#delete" data-backdrop="static" data-keyboard="false"><i class="fas fa-eye"></i></button></td>
</tr>
<?
$count++;
}
?>
<tr>
<td colspan="9">View Details</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
and my jquery coding to reload div is
$(document).ready(function(){
setInterval(function(){
$("#here").load(window.location.href + " #here" );
}, 3000);
});
whats error going on i cann't understand.image before apply load
image after load
To stop the loop you can use clearInterval()
Jquery replace with this
$(document).ready(function(){
window.setInterval(function(){
$("#here").load(window.location.href + " #here");
}, 3000);
clearInterval()
});
What do I need to change from below code in order to get all the subjects in the same table?
<?php
include('grade.php');
$mysubject = $grade->getsubject();
?>
<p>This is a template for a simple marketing or informational website. It includes a large callout called a jumbotron and three supporting pieces of content. Use it as a starting point to create something more unique.</p>
<p><a class="btn btn-primary btn-lg" href="#" role="button">Learn more »</a></p>
</div>
</div>
<div class="container">
<!-- Example row of columns -->
<div class="row">
<?php foreach($mysubject as $row): ?>
<div class="col-lg-4 gradeform">
<div class="form_hover " style="background-color: #428BCA;">
<p style="text-align: center; margin-top: 20px;">
<i class="fa fa-bar-chart-o" style="font-size: 147px;color:#fff;"></i>
</p>
<div class="header">
<div class="blur"></div>
<div class="header-text">
<div class="panel panel-success" style="height: 247px;">
<div class="panel-heading">
<h3 style="color: #428BCA;">Subject: <?php echo $row['subject'];?></h3>
</div>
<div class="panel-body">
<table class="table table-bordered">
<tr class="alert alert-danger">
<th>TD</th>
<th>Exam</th>
<th>catching</th>
<th>average</th>
</tr>
<?php $mygrade = $grade- >getgrade($row['id']); ?>
<tr>
<td><?php echo $mygrade['att1']; ?></td>
<td><?php echo $mygrade['exam1']; ?></td>
<td><?php echo $mygrade['quiz1']; ?></td>
<td><?php echo $mygrade['project1']; ?></td>
</tr>
</table>
<div class="form-group">
<?php $teacher = $grade->getteacher($row['id']); ?>
<label>Teacher: <?php echo $teacher;?></label><br />
<label>Semester: <?php echo $row['sem']?> Sem</label><br />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
i have every subject in différent table
The problem is, in each iteration of foreach loop you're creating a new table. If you want to display all the subjects under one table, just take the <table> outside of your foreach loop, like this:
// your code
<div class="container">
<!-- Example row of columns -->
<div class="row">
<div class="col-lg-4 gradeform">
<div class="form_hover " style="background-color: #428BCA;">
<p style="text-align: center; margin-top: 20px;">
<i class="fa fa-bar-chart-o" style="font-size: 147px;color:#fff;"></i>
</p>
<div class="header">
<div class="blur"></div>
<div class="header-text">
<div class="panel panel-success" style="height: 247px;">
<table class="table table-bordered">
<?php foreach($mysubject as $row): ?>
<div class="panel-heading">
<h3 style="color: #428BCA;">Subject: <?php echo $row['subject'];?></h3>
</div>
<div class="panel-body">
<tr class="alert alert-danger">
<th>TD</th>
<th>Exam</th>
<th>catching</th>
<th>average</th>
</tr>
<?php $mygrade = $grade- >getgrade($row['id']); ?>
<tr>
<td><?php echo $mygrade['att1']; ?></td>
<td><?php echo $mygrade['exam1']; ?></td>
<td><?php echo $mygrade['quiz1']; ?></td>
<td><?php echo $mygrade['project1']; ?></td>
</tr>
<div class="form-group">
<?php $teacher = $grade->getteacher($row['id']); ?>
<label>Teacher: <?php echo $teacher;?></label><br />
<label>Semester: <?php echo $row['sem']?> Sem</label><br />
</div>
<?php endforeach; ?>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
Ok, I have spent hours on this trying to get the classes to manipulate like I need.
However, the columns are giving too much space between the days.
Here is what I have thus far. http://tinypic.com/r/2hx0jnp/8
<div class="row hours_bg">
<h4>Hours</h4>
<div class="col-xs-2">
<br />
Open
<br />
<br />
Close
</div>
<div class="col-xs-10 hours_div">
<?php foreach($days as $day):
$daylow = strtolower($day);
?>
<div class="col-xs-6 col-xs-1">
<div class="row">
<div class="col-xs-6 col-xs-3"><?php echo $day[0]; ?></div>
</div>
<div class="row">
<div class="col-xs-6 col-xs-3">
<span id="pre_open_<?php echo $daylow ?>">
<?php echo isset($location['open_' . $daylow]) ? $location['open_' . $daylow] : '' ?>
</span> <br />
<span id="pre_close_<?php echo $daylow ?>">
<?php echo isset($location['close_' . $daylow]) ? $location['close_' . $daylow] : '' ?>
</span>
</div>
<br />
</div><!-- row -->
</div>
<?php endforeach; ?>
</div>
<div class="clearfix"></div>
This is the result I need: http://tinypic.com/r/2ikeaee/8
I really have tried everything I know.
I can move the hours margin -left pixels to not overlap the open and close text. However, again the ending s or Sunday will cut off because the columns are too wide.
I do have some other css:
.hours_bg {
background: #fff;
}
.hours_div {
margin-left: -50px;
width: 100%;
}
A row needs to be within a container class.
This row is then broken into 12 segments col After you finish each segment of 12 cols you should create a new row.
Your code should be simular to this although i have not tested it:
<div class="container">
<div class="row">
<h4 class='hours_bg'>Hours</h4>
<div class="col-xs-2">
<br />
Open
<br />
<br />
Close
</div>
<div class="col-xs-10 hours_div">
<?php foreach($days as $day):
$daylow = strtolower($day);
?>
<div class="row">
<div class="col-xs-6 col-xs-3"><?php echo $day[0]; ?></div>
<div class="col-xs-6 col-xs-3">
<span id="pre_open_<?php echo $daylow ?>">
<?php echo isset($location['open_' . $daylow]) ? $location['open_' . $daylow] : '' ?>
</span> <br />
<span id="pre_close_<?php echo $daylow ?>">
<?php echo isset($location['close_' . $daylow]) ? $location['close_' . $daylow] : '' ?>
</span>
</div>
<br />
</div>
<?php endforeach; ?>
</div>
</div>
</div>
<div class="clearfix"></div>
Notice how each row will contain 12 col total.
REF : Bootstrap Grid
Stepping away from the div, perhaps a table would be more suited ?>
<table class="table">
<thead>
<tr>
<th></th>
<th>Monday</th>
<th>Tuesday</th>
<th>Wednesday</th>
<th>Thursday</th>
<th>Friday</th>
<th>Saturday</th>
<th>Sunday</th>
</tr>
</thead>
<tbody>
<tr>
<td>OPEN</td>
<td>9AM</td>
<td>9AM</td>
<td>9AM</td>
<td>9AM</td>
<td>9AM</td>
<td>9AM</td>
<td>9AM</td>
</tr>
<tr>
<td>CLOSE</td>
<td>9AM</td>
<td>9AM</td>
<td>9AM</td>
<td>9AM</td>
<td>9AM</td>
<td>9AM</td>
<td>9AM</td>
</tr>
</tbody>
</table>
As you can see here JSFiddle with static content its much easier to see whats going on..