Streaming live at 10am (PST)

Coding a Highlight for Current Day


#1

Hiya,

I am working a site for a client that requires having the current day's opening hours highlighted, We have used this coding before but doesn't seem to be working this time around, if anyone has any suggestions that would be great!

Here's a link to the site:
http://rox-beauty-thearpy.webflow.io/

Here's the coding we have been using:

<script>
var day = new Date().getDay() - 1;
$('.opening-days li').eq(day<0?6:day).css('font-weight','bold');
$('.times li').eq(day<0?6:day).css('font-weight','bold');
  
</script>

Thanks


#2

It does works, doesnt it?


#3

Hi Daniel,

Thanks for the reply, I managed to get it working after I posted this :slight_smile:

Thanks


#4