title: jQuery if statement, Data correct but dosen't pass thorough
body: <p>I am having an issue with an if statement which is giving me the right data but no passing through... SO:</p>
  
  <p>i have</p>
  
  <p>-- Hidden Carrier --</p>
  
  <pre><code>&lt;div id="HiddenCurrentDate"&gt;
  &lt;?php
  $CurrentDate = date('d-m-y');
  echo $CurrentDate;
  ?&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>-- row --</p>
  
  <pre><code>&lt;td class="WDClass"&gt;&lt;div id="WDD'.$row["id"].'" class="WDDiv"&gt;'. 
  $row["StartDate"] .'&lt;/div&gt;&lt;/td&gt;
  </code></pre>
  
  <p>-- jQuery --</p>
  
  <pre><code>var CurrentDate = $("#HiddenCurrentDate").text();
  var StartedDates = $(".WDDiv");
  
  $(StartedDates).each(function() {
  
  var DateID = '#' + $(this).attr('id');    
  var DateString1 = $(DateID).text();
  if(CurrentDate === DateString1){
      alert('Match');
  }else{
      alert('No Match: current-' + CurrentDate + " -  Row " + DateString1 );
  }
  
  });            
  </code></pre>
  
  <p>So this here when effected gives me the correct date when called... But it does not pass through the if it just gets "ELSED" :/</p>