Advertisement
Guest User

Untitled

a guest
Sep 4th, 2017
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.79 KB | None | 0 0
  1. <head>
  2. <style>
  3. .showAtDate { display: none; }
  4. </style>
  5.  
  6. //Modify the following and check it:
  7. <table id="itemsTable" class="showAtDate" data-limit="' . date("Y/m/d H:i:s", strtotime("+1 week")) . '">
  8.  
  9. //Added to the bottom
  10. <script type="text/javascript">
  11.                 $(function() {
  12.                         var currentDate = Date.now();
  13.                         $("table.showAtDate").each(function() {
  14.                                 var specifiedDateLimit = $(this).data(\'limit\');
  15.                                 var date = Date.parse(specifiedDateLimit);
  16.                                 if(!isNaN(date) && currentDate - date < 0) {
  17.                                        $(this).show();
  18.                                 }
  19.                         });
  20.                 });
  21.         </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement