JQuery的新功能和我無法爲我的生活弄清楚這一點。我知道這將是一個簡單的。用jQuery依賴日期更改Div類
不能做這個服務器端。
我正在爲季節瑜伽客戶的網站工作。在入門頁面上,我每個季節都有5個div。我只想要一個依賴於在任何給定年份的日期。
例如,春季是3月1日至5月31日(含)。
夏季繼續等等等等我還沒有給出具體的日期。
使用基金會5,所以我將.hide附加到每個div。
因此腳本應該檢查日期和刪除.hide類從哪個的div的是正確的季節。
<div id="winter-panel" class="hide small-12 medium-6 columns">
<div class="panel">
<h3>Winter</h3>
<p>Winter is the water element, a time to flow smoothly and be reflective in our thoughts and in our actions.</p>
<p>Natures energy is at it's lowest at 1/5 and the earth seems quieter as vegetation has gone and animals are hibernating -
we should do the same: slow down, sleep when you can and conserve energy for the lighter months ahead.</p>
<a class="button" href="winter.html">Read more</a>
</div>
</div>
冬會那麼包含以下號碼:11,0和1 在你的代碼是從Januari檢查到5月。 – timo