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
Post a Comment