Created
November 30, 2015 16:37
-
-
Save primozcigler/68d6cf7ad474b21c9f0a to your computer and use it in GitHub Desktop.
highlight current day
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ========== | |
// = 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