https://codepen.io/lasjorg/pen/PoQqOQa is the solution!!! Thank you so very very very much!!!
Happy to help. I would like to make sure you understand why that code works.
-
The date value is generated and set as the content for the
span
element. -
The jQuery selector looks for the span (
each
is a loop) and saves its content ascellValue
, i.e. the date value. -
To get the parent
th
element of thespan
we use theparent()
jQuery function. -
Instead of coloring
$(this)
which is the span, we color$(this).parent()
which is theth
parent element.
Let me know if you are done with my Codepen, you can fork it (fork button at the footer) and I will delete it.
Very much appreciated, @ lasjorg. I’ve forked the codepen and exported it as a zip so I have a local backup too. Thanks!
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.