我正在使用带有以下标记的日历:http: //jsfiddle.net/PHznZ/
使用 jQuery,我如何用一个名为的包含元素来包装每个星期(星期日.start-week
到星期六) ?示例:http: //jsfiddle.net/PHznZ/1/.end-week
.full-week
这是目标 HTML 代码:
<div id="calendar">
<article class="day start-week">
<span class="dayname">Sunday</span>
<p>Lorem ipsum...</p>
</article>
<article class="day">
<span class="dayname">Monday</span>
<p>Lorem ipsum...</p>
</article>
<article class="day">
<span class="dayname">Tuesday</span>
<p>Lorem ipsum...</p>
</article>
<article class="day">
<span class="dayname">Wednesday</span>
<p>Lorem ipsum...</p>
</article>
<article class="day">
<span class="dayname">Thursday</span>
<p>Lorem ipsum...</p>
</article>
<article class="day">
<span class="dayname">Friday</span>
<p>Lorem ipsum...</p>
</article>
<article class="day end-week">
<span class="dayname">Saturday</span>
<p>Lorem ipsum...</p>
</article>
<article class="day start-week">
<span class="dayname">Sunday</span>
<p>Lorem ipsum...</p>
</article>
<article class="day">
<span class="dayname">Monday</span>
<p>Lorem ipsum...</p>
</article>
<article class="day">
<span class="dayname">Tuesday</span>
<p>Lorem ipsum...</p>
</article>
<article class="day">
<span class="dayname">Wednesday</span>
<p>Lorem ipsum...</p>
</article>
<article class="day">
<span class="dayname">Thursday</span>
<p>Lorem ipsum...</p>
</article>
<article class="day">
<span class="dayname">Friday</span>
<p>Lorem ipsum...</p>
</article>
<article class="day end-week">
<span class="dayname">Saturday</span>
<p>Lorem ipsum...</p>
</article>
<article class="day start-week">
<span class="dayname">Sunday</span>
<p>Lorem ipsum...</p>
</article>
<article class="day">
<span class="dayname">Monday</span>
<p>Lorem ipsum...</p>
</article>
<article class="day">
<span class="dayname">Tuesday</span>
<p>Lorem ipsum...</p>
</article>
<article class="day">
<span class="dayname">Wednesday</span>
<p>Lorem ipsum...</p>
</article>
<article class="day">
<span class="dayname">Thursday</span>
<p>Lorem ipsum...</p>
</article>
<article class="day">
<span class="dayname">Friday</span>
<p>Lorem ipsum...</p>
</article>
<article class="day end-week">
<span class="dayname">Saturday</span>
<p>Lorem ipsum...</p>
</article>
<article class="day start-week">
<span class="dayname">Sunday</span>
<p>Lorem ipsum...</p>
</article>
<article class="day">
<span class="dayname">Monday</span>
<p>Lorem ipsum...</p>
</article>
<article class="day">
<span class="dayname">Tuesday</span>
<p>Lorem ipsum...</p>
</article>
<article class="day">
<span class="dayname">Wednesday</span>
<p>Lorem ipsum...</p>
</article>
<article class="day">
<span class="dayname">Thursday</span>
<p>Lorem ipsum...</p>
</article>
<article class="day">
<span class="dayname">Friday</span>
<p>Lorem ipsum...</p>
</article>
<article class="day end-week">
<span class="dayname">Saturday</span>
<p>Lorem ipsum...</p>
</article>
</div>