I'm currently working on a very simple calendar using Jquery.
Actually, We need a Weekly view for some events, with the possibility to change the week using Jquery (like on Google Calendar).
The easiest way I thought is wrapping each week into a <div>
, and with Jquery moving along the different divs / weeks in a slider-like style.
Actually I need a way to number the single divs, and I was thinking to use a "virtual" attribute week-number
, i.e.
<div week-number="3"> ... </div>
That's ok when moving to next weeks, but to go to the previous one? Logically, I would get negative week numbers, providing the starting week is numbered "1", that's to say
<div week-number="-3"> ... </div>
I really don't like so much this approach, so have you any idea about identifying the different divs / weeks?
EDIT : Thinking about it: what about using numbered classes? as example class="week-1"
,class="week-2"
, etc. ?