Skip to content

Instantly share code, notes, and snippets.

@primozcigler
Created November 30, 2015 16:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save primozcigler/68d6cf7ad474b21c9f0a to your computer and use it in GitHub Desktop.
Save primozcigler/68d6cf7ad474b21c9f0a to your computer and use it in GitHub Desktop.
highlight current day
// ==========
// = Highlight current date =
// ==========
(function() {
var
timeTable = $('.js--timetable'),
date = new Date();
if(timeTable.length > 0) {
date = date.getDay();
timeTable.children('[data-day="'+date+'"]').addClass('today');
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment