日付と時刻が関連付けられたシステムアラートのリストがあります。日付は、日付が変更された場合にのみ表示されます。私が欲しいのは、#shell
別の日付がそれを置き換えるまで、一番上の日付が一番上に留まるようにすることです。これは、連絡先アプリがiPhoneでどのように機能するかと非常によく似ています。
必要なjQueryコードをすべて含むjsFiddleをセットアップしました。誰かがここで私を助けてくれるなら、私は非常に感謝するでしょう-私は現在どこから始めればいいのか分かりません!
HTMLの抜粋:
<div id="shell">
<div id="alertList">
<div id="alert_0" class="alert">
<span class="date">22 Nov, 2012</span>
<span class="time">02:28</span>
System alert happened
</div>
</div>
</div>
jQueryコード
$("#shell").scroll(function() {
//This is where the code would be to lock (or alter the margin-top) of the
//date would be in order to keep it locked to the top
});