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

Delphi change the assembly code of a running process -

java - Parsing XML, skip certain tags -

c# - ASP.NET MVC Sequence contains no matching element -