I’m trying to create a sort of a to-do list on a webpage which essentially is one big list with tasks, but divided by dates.
To achieve this, I was thinking of creating two columns. In the left, I would like to show boxes that hold the date in it and in the right column, I would like to show the list with the tasks.
I would like for the date box in the left column to scroll along with the list and for it to be linked to the first item with that date.
Once it reached the top of the page (or div) I would like it to remain on the top, much like a sticky header, until the next date box scrolls up to replace it.
But how can I link these dateboxes with the <li>
in the other column?
Any advice would be appreciated.
There’s a jsfiddle to show a bit more what I’m trying to get: https://jsfiddle.net/jsfnx0yL/1/
2
Answers
The easiest way, without using javascript, is to add hidden blocks that will be identical to the height of the row, which will allow you to place blocks with dates where tasks for this date begin.