Query undefined when trying to match dates
When trying to check if dates match in two divs, e.g.
- <div class="start_date">Wednesday 01 January</div>
- <div class="end_date">Wednesday 01 January</div>
This is what I've written so far, but keep getting "undefined"
- var a = $('.start_date'), b = $('.end_date'); if( a.text() == b.text() ) { $('.end_date').addClass('hide'); }
Any ideas what I'm missing...?