Hello.

I'm new to javascript and jQuery.
But I have been given this task to make a vacancy calendar which shall
highlight an amount of days selected by a select option value when I
hover it.
What I would like to do:
When I hover a day which is vacant, it will also highlight the
selected amount of days following it, sort of grouping them together.
But if there is a day which is occupied or a class="b" in between, it
will higlight the "group" with red.

The calendar is built up like this dynamically:
<ul>
<li class="month">
<div><span>mon</span><span>tue</span><span>wed</span><span>thu</
span><span>fri</span><span>sat</span><span>sun</span></div>
<span class="a"><a href="#">1</a></span>
<span class="a"><a href="#">2</a></span>
<span class="a"><a href="#">3</a></span>
<span class="b">4</span>
<span>5</span>
<span class="a">6<a href="#"></a></span>
<span class="a">7<a href="#"></a></span>
..etc
</li>
<li class="month">
<div><span>mon</span>..etc</div>
<span class="none"></span>
<span class="a">1<a href="#"></a></span>
<span class="a">2<a href="#"></a></span>
<span class="a">3<a href="#"></a></span>
..etc
</li>
..etc
</ul>
Where
<span class="a"> = vacant
<span class="b"> = vacant but not within the selected amount of days
<span> = occupied
<span class="none"> = no day(this is for emty days in the beginning of
a month, like when if the first day in a month starts on tuesday, it
will render the previous days with this class)

Im not sure if this is the right way or if there is a better way to do
this.
Hope someone can help me out here, because i would really like this
project to use jQuery.

Reply via email to