Let's say I have 4 divs, each with specific day/days when a class needs to be added. For example:
<code><div class="on-17 on-18"></div>
<div class="on-20"></div>
<div class="on-21"></div>
<div class="on-22"></div>
I want to add the "active" class to the first div if today is the 17th or 18th of the current month. Any suggestions? It doesn't necessarily need to involve extracting "on-17" to get the number 17, it can be done manually by checking for certain 'on#' values, such as 17, 18, 20, 21, 22.
For instance, if today were March 17, 2015, it would trigger the addition of the active class to
<div class="on-17 on-18"></div>
resulting in <div class="on-17 on-18 active"></div>