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

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

ubuntu - Bash Script to Check That Files Are Being Created -