Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7732355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T06:42:36+00:00 2026-06-01T06:42:36+00:00

If I have a 7 day calendar with a DIV and UL for each

  • 0

If I have a 7 day calendar with a DIV and UL for each day, how can I add the class of “today” to the LI “day” for the day of the week? (i.e. Monday, Tuesday, Wednesday, etc.)

Basically I just want to highlight the day of the week on the page load.

I assume this can be accomplished with jQuery, but I am just getting the hang of it, so any suggestions to point me in the right direction would be greatly appreciated.

Here is the basic HTML I am using for the content:

  <div id="main_content">
   <div id="weekly_schedule">
     <ul class="day_container">
       <li class="day">Su</li>
       <li class="day_content">content</li>
     </ul>
     <ul class="day_container">
       <li class="day">Mo</li>
       <li class="day_content">content</li>
     </ul>
     <ul class="day_container">
       <li class="day">Tu</li>
       <li class="day_content">content</li>
     </ul>
     <ul class="day_container">
       <li class="day">We</li>
       <li class="day_content">content</li>
     </ul>
     <ul class="day_container">
       <li class="day">Th</li>
       <li class="day_content">content</li>
     </ul>
     <ul class="day_container">
       <li class="day">Fr</li>
       <li class="day_content">content</li>
     </ul>
     <ul class="day_container">
       <li class="day">Sa</li>
       <li class="day_content">content</li>
     </ul>
  </div>
</div>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T06:42:38+00:00Added an answer on June 1, 2026 at 6:42 am

    You may try something like the following:

    $('li.day:eq(' + new Date().getDay() + ')').addClass('today');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page like this : <div id=daysTable> <div id=day0 class=day></div> <div id=day1
I have a calendar/table that when you hover over each day we have a
I am building an Day View calendar app. I have already created the empty
I have start date and end date. I also have particular day i.e. wednesday.
(second question today - must be a bad day) I have a dataframe with
The Markup: <div class=day> <span>1</span> <div class=icon-shop icon-blank><p class=event-details id=shop-1></p></div> <div class=icon-eat icon-blank><p class=event-details
I have SharePoint calendar control with multi day events: Calendar http://1.bp.blogspot.com/_8yYCvwdJans/RuECTJE5OmI/AAAAAAAAACc/iEqKLxyaZ9I/s1600-h/5.PNG http://1.bp.blogspot.com/_8yYCvwdJans/RuECTJE5OmI/AAAAAAAAACc/iEqKLxyaZ9I/s1600-h/5.PNG Here, the
We have a utility that will run any day between Monday - Friday. It
i have created a calendar where a suer can scroll through previous and next
I have next code: Calendar cal = Calendar.getInstance(); cal.add(Calendar.YEAR, mYear); /2011 cal.add(Calendar.MONTH, mMonth); /04

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.