I'm trying to add an HTML next to an existing element in my page. This is what I've tried::
HTML/PHP
<?php
if ( $duedatereservation < $today ) {
//echo "Past Due!";
$isPastDue = true;
}
?>
<div class="container">
<div class="inner">Transaction Date</div>
<div class="inner">Due Date</div>
</div>
<h2 id="report">Notice</h2>
jquery:
$(document).ready(function(){
$("<span>Past Due!</span>").insertAfter("#report");
});
What exactly I want is when the condition $isPastDue is true, I want to append/add a html tag next to #report h2. But it's not displaying. Any ideas? Help is much appreciated. Thanks.