Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getDayOfWeek() {
- var newDate = new Date();
- newDate = newDate.getDay();
- for(i=1;i<=6;i++) {
- if(newDate == i) {
- $('#day'+i).addClass('active-day').prepend('<p class="today"><b>TODAY</b></p>');
- $('#day'+i).parent().css('background-color','#4A9D22');
- } else if (newDate == 0 && i == 6) {
- $('#day7').addClass('active-day').prepend('<p class="today"><b>TODAY</b></p>');
- $('#day7').parent().css('background-color','#4A9D22');
- }
- }
- }
- getDayOfWeek();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement