title: Jquery/ javascript display link using html date
body: <p>I am trying to get links to display dependent on the time attribute in html is this possible? Or is there a better way of doing it. I understand the limitations of using this client side ( but it should not be a problem for the users)
  html</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var now = new Date();
  
  if(now &gt; datetime) // today is after linkdate
  {
       $('.datelink').show();
  }</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>body {
    color:red;
  }
  
  .datelink{
      display:none;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>  &lt;li&gt;WHITBY  &lt;time datetime="2015-11-1"&gt;November 1st 11.00&lt;/time&gt;&lt;a href="bbc.co.uk" class="datelink"&gt; SOME LINK &lt;/a&gt;  &lt;/li&gt;
      &lt;li&gt;EASINGWOLD  &lt;time datetime="2015-11-2"&gt;November 2nd 10.34&lt;/time&gt;&lt;a href="bbc.co.uk" class="datelink"&gt; SOME LINK &lt;/a&gt;  &lt;/li&gt;
      &lt;li&gt;DARLINGTON  &lt;time datetime="2015-11-15"&gt;November 15th 9.30&lt;/time&gt;&lt;a href="bbc.co.uk" class="datelink"&gt; SOME LINK &lt;/a&gt;  &lt;/li&gt;
      &lt;li&gt;RIPON CITY  &lt;time datetime="2015-11-16"&gt;November 16th 11.00&lt;/time&gt;&lt;a href="bbc.co.uk" class="datelink"&gt; SOME LINK &lt;/a&gt;  &lt;/li&gt;
      &lt;li&gt;ROMANBY  &lt;time datetime="2015-11-20"&gt;November 20th 13.00&lt;/time&gt;&lt;a href="bbc.co.uk" class="datelink"&gt; SOME LINK &lt;/a&gt;  &lt;/li&gt;
      &lt;li&gt;KIRKBYMOORSIDE &lt;time datetime="2015-11-21"&gt;November 21st&lt;/time&gt;&lt;a href="bbc.co.uk" class="datelink"&gt; SOME LINK &lt;/a&gt;  &lt;/li&gt;
      &lt;li&gt;BEDALE  &lt;time datetime="2015-11-22"&gt;November 22nd 8.30&lt;/time&gt;&lt;a href="bbc.co.uk" class="datelink"&gt; SOME LINK &lt;/a&gt; &lt;/li&gt;
      &lt;li&gt;CATTERICK  &lt;time datetime="2015-11-23"&gt;November 23rd 9.00&lt;/time&gt;&lt;a href="bbc.co.uk" class="datelink"&gt; SOME LINK &lt;/a&gt; &lt;/li&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>is it possible to get the 'datetime' from the html to the if statement in jquery?</p>