html - How to do time check in jQuery? -



html - How to do time check in jQuery? -

i hava li in html:

<li>11.8</li> <!--november 8th--> <li>11.9</li> <li>11.11</li> <li>11.12</li>

how can utilize jquery check date alter '11.12' 'today'? (suppose today 11.12)

like this:

<li>11.8</li> <!--november 8th--> <li>11.9</li> <li>11.11</li> <li>today</li>

try this:

$(function(){ var date = new date(); $('li:contains(' date.getmonth()+1 + '.' + date.getdate() + ')').html('today'); }); demo

jquery html

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

java - Bypassing "final local variable defined in an enclosing type" -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -